Error Handling Reference
Below is a list of errors and warnings returned by the API when handling requests for NPRML output. Error messages will abort the request and display the message. Warning messages will return a result set with the messages at the top of the document.
NOTICE: For outputs other than NPRML, the API will return general errors compatible with the requested format. At this time, the API will not return messages specific to the output format.
The following are error messages that will prevent the API from executing the query and/or returning results.
|101||NPR is experiencing system issues at this time. Please try this request again later.|
|310||The API key passed in ($data) was invalid or no API key was passed in. Please register for a valid API key.|
|311||The API key passed in ($data) was deactivated. We will contact the email associated with this API key, but you may also contact us by visiting http://www.npr.org/contact/ and selecting the office 'Online / Technical Support'.|
The following are warning messages returned by the API. These warnings will not necessarily prevent the API from executing the query or returning results, but it could prevent areas of the request from getting handled. Warning messages will not be returned if an error is also encountered.
|201||Query parameter '$data' is invalid and was ignored.|
|202||The query parameter '$data' does not make sense with the other parameters used and was ignored.|
|203||Query parameter id='$data' is invalid because it is not an integer and was ignored.|
|204||A combination of IDs that includes list IDs ($data) is invalid. Please use list IDs by themselves only.|
|301||The field '$data' is invalid and was ignored.|
|302||The number of results you requested exceeded our maximum ($data). Please use the startNum parameter to page through the results.|
|303||You entered a search type without entering a search term. The search type you entered was not used in this query.|
|304||Your field parameter 'none' was ignored because you requested other fields ($data).|
|305||Because the field parameter 'all' was used, all other field parameters passed in were ignored ($data).|
|306||Your parameter ($data) was in the future, so it was reset to now.|
|307||Your start date ($data) was later than your end date. The query will search only for stories on the end date.|
|308||The number of results you requested exceeded our maximum ($data). Please use the startNum parameter to page through the results.|
|309||We are not supporting changing the fields displayed in the HTML or JS format at this time. The fields you entered ($data) were ignored. Please use styles to avoid displaying various parts of the output.|
|401||There were no results that matched your query criteria.|
Below is an example of how multiple messages get returned by the API.