Documentation » General Web Service Errors
General Web Service Errors
Certain, general errors will be returned in a standardized way from all OpenEI Web services. Additional, service-specific error messages may also be returned (see individual service documentation for those details). The following list describes the general errors any application may return:
Error Messages
A brief description of the error will be returned in the response body. These error message are subject to change, so it's suggested any error handling use the HTTP status code and not the contents of this message.
Error Message Response Formats
Depending on the requested format, the error message response may be returned in JSON, XML, CSV, or plain text. Unknown request formats will return errors in plain text format.
JSON Example
1 2 3 4 5 |
{
"errors":[
"An error has occurred."
]
}
|
XML Example
1 2 3 4 | <?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>An invalid api_key was supplied. Get one at https://developer.nrel.gov/</error>
</errors>
|
CSV Example
1 2 | Error
An invalid api_key was supplied. Get one at https://developer.nrel.gov/
|
Plain Text Example
1 | Error: An invalid api_key was supplied. Get one at https://developer.nrel.gov/
|