Errors
How Benzinga API responds when errors occur.
Benzinga uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Benzinga’s servers.
Some 4xx errors that could be handled programmatically include an error code that briefly explains the error reported.
Parameters
The type of error returned.
One of invalid_request_error
, not_found_error
, creation_error
,
update_error
, deletion_error
, forbidden_error
, or authentication_error
.
A human-readable message providing more details about the error.
If the error is parameter-specific, this will contain a list of the parameters that were invalid.
Error Response
- Unauthorized
401
- Invalid token, check the token provided.
❗ Could not connect to wss://api.benzinga.com/api/v1/analyst/insights/stream?token=bz.p***
Error: Unexpected server response: 401
Handshake Details
- Bad Gateway
502
- Either invalid route or server error.
❗ Could not connect to wss://api.benzinga.com/api/v1/analyst/insights/stream?token=bz.p***
Error: Unexpected server response: 502
Handshake Details
Was this page helpful?