General Web Service Errors
Certain, general errors will be returned in a standardized way from all NREL 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:
|HTTP Status Code
Forbidden - Either no api_key parameter was supplied in the URL, or an invalid api_key was given. You can get your own API key.
Service Unavailable - Your API key has exceeded the rate limits. See rate limits for more detail.
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.
"An invalid api_key was supplied. Get one at http://developer.nrel.gov/"
<?xml version="1.0" encoding="UTF-8"?>
<error>An invalid api_key was supplied. Get one at http://developer.nrel.gov/</error>
An invalid api_key was supplied. Get one at http://developer.nrel.gov/
Plain Text Example
Error: An invalid api_key was supplied. Get one at http://developer.nrel.gov/