From 4899a29aea46bf886ced5c86d02e080eb965cf7f Mon Sep 17 00:00:00 2001 From: Raka Hourianto <175479716+hourianto@users.noreply.github.com> Date: Sun, 17 Nov 2024 23:15:48 +0300 Subject: [PATCH] Update for the new AWS error --- AWSAsync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AWSAsync.py b/AWSAsync.py index 38d9365..95db8e7 100644 --- a/AWSAsync.py +++ b/AWSAsync.py @@ -66,7 +66,7 @@ async def test_invoke_perms(key: APIKey, session, model): if message and ('The request signature we calculated does not match the signature you provided' in message or 'The security token included in the request is invalid' in message): return False elif response.status == 400 or response.status == 404: - if message and 'Malformed input request' in message: + if message and 'The provided body' in message: if key.region == "": key.region = region else: @@ -190,7 +190,7 @@ async def invoke_model(key: APIKey, session, region, model): async with session.post(url, headers=signed_headers, data=signed_data) as response: if response.status == 400: resp = await response.json() - if resp['message'] and 'Malformed input request' in resp['message']: + if resp['message'] and 'The provided body' in resp['message']: key.models[region].append(model_name) elif resp['message'] and 'Operation not' in resp['message']: key.useless = True