You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the request URL to ApifyApiError and improve the message for an empty error body #1177
ApifyApiError exposes message, type, status_code, attempt, http_method and data (errors.py#L55-L79). It has no URL or path, so a log line such as NotFoundError: Actor was not found does not say which request failed. The raising code knows the URL (_base.py#L680).
When the body has no error object, the message is f'Unexpected error: {response.text}' (#L65). For an empty body, such as a bare 502 from a proxy, that is just Unexpected error: , with no status code.
The JS ApifyApiError has path (pathname plus query), clientMethod and originalStack, and prints them in its stack (apify_api_error.ts#L43-L138).
Expected behavior
ApifyApiError gets a url (or path) attribute, with any token in the query string removed, and includes the method and path in str(exc). When the body carries no error message, the message names the status code, for example Unexpected error (HTTP 502): <body>, and drops the body part when it is empty.
Activity