Developer Network NREL NREL Developer Network
Documentation » General Web Service Errors

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 Description
403 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.
503 Service Unavailable - Your API key has exceeded the rate limits. See rate limits for more detail.

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 invalid api_key was supplied. Get one at http://developer.nrel.gov/"
  ]
}

XML Example

1
2
3
4
<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>An invalid api_key was supplied. Get one at http://developer.nrel.gov/</error>
</errors>

CSV Example

1
2
Error
An invalid api_key was supplied. Get one at http://developer.nrel.gov/

Plain Text Example

1
Error: An invalid api_key was supplied. Get one at http://developer.nrel.gov/