Response codes

OpenNode uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xxrange indicate success, in the 4xxrange indicate an error that failed given the information provided (usually a required parameter was omitted or incorrectly sent), in the 5xxrange indicate an error with OpenNode's servers.

Status CodeMeaningHTTP Response
200 - OKEverything worked as expected{ data: { ... } }
201 - OKEntity created with success{ data: object }
400 - Bad RequestThe request was unacceptable, often due to incorrect or missing required parameter.{ success: false, message: 'Error details' }
404 - Not FoundThe requested resource doesn't exist{ success: false, message: 'Error details' }
500 - Server ErrorsSomething went wrong with OpenNode's servers{ success: false, message: 'Error details' }

Our official API libraries raise exceptions when errors are thrown. We recommend writing code that gracefully handles all the possible API exceptions.