Skip to main content
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

string
The type of error returned.One of invalid_request_error, not_found_error, creation_error, update_error, deletion_error, forbidden_error, or authentication_error.
string
A human-readable message providing more details about the error.
array
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
Request Method: “GET”
Status Code: “401 Unauthorized”
  • 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
Request Method: “GET”
Status Code: “502 Bad Gateway”