Errors
Occasionally an error will be returned from the API, either because no data fit the request, invalid authentication, or (rarely) a problem internal to the API itself. Most errors are handled by the API, and you will receive a summary JSON output in lieu of data. Additionally, access restrictions within the Synoptic dataset are enforced by the API with errors for each request of data a token can’t access.
Errors will provide at least the following two elements:
Response Messages
The response messages typically help a user understand and correct the API error. These self-describing and brief explanations will describe the general reason for the error.
Response Code
The response codes correlate to a broader error type. Errors are grouped together based on the similar problematic requests types. Response codes are categories are listed as follows:
Response Code | Message |
---|---|
| Incorrect API parameter input |
| No errors |
| Zero results |
| Authorization error |
| URL not found |
| Internal errors |
-1 - Incorrect API parameter input
These errors occur when an invalid input is passed through an API parameter.
{
SUMMARY: {
NUMBER_OF_OBJECTS: 0,
RESPONSE_CODE: -1,
VERSION: "v2.21.3",
RESPONSE_MESSAGE: "START cannot be after END.",
RESPONSE_TIME: 0
}
}
Possible response code -1 messages:
Message | Description |
---|---|
|
|
|
|
| This will only be returned as a response code -1 message for the Latency service. No latency data for the specified query. |
| This will only be returned as a response code -1 message for the Networks service. No network data for the specified query. |
| This will only be returned as a response code -1 message for the Networks Types and QC Types services. No data for the specified query. |
| In the Nearest Service, |
| The |
| The |
| Make sure your query has properly encoded UTF-8 characters. |
| The API was unable to properly output the requested data, please reach out to support@synopticdata.com with your query URL. |
2 - No Results
Errors with a response code of 2 indicate no data was returned for a query due to various reasons.
{
SUMMARY: {
RESPONSE_CODE: 2,
RESPONSE_MESSAGE: "Invalid token. Be sure to use a token generated from your API Key, and not the key itself.",
VERSION: null,
HTTP_STATUS_CODE: 401
}
}
These errors can also be returned outside of JSON format, such as:
{"SUMMARY": {"RESPONSE_CODE": 2, "RESPONSE_MESSAGE": "Too many requests sent. Please wait for other requests to finish and resend.", "VERSION": null, "HTTP_STATUS_CODE": 429}}
Possible response code 2 messages:
HTTP Status Code | Message | Description |
---|---|---|
| No stations fitting your selection criteria. In the event that no data was found for the queried stations, this error will occur. This includes cases when two selection criteria cancel each other out. If you anticipate sometimes the request may return stations with no data, you can add | |
| The token and its associated account does not have access enabled for the Weather Data API. | |
|
| The token passed is not recognized, the API key can’t be passed here instead of the token. Commonly occurs with mistyped tokens. |
|
| Under “Customer & contract” in the Customer console, “Access” will indicate the data services (including the API) that an account has access to. |
|
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |
|
| You have reached your concurrency and request waitlist limit, you will have to wait to send more queries. Refer to API Performance and Limits for more details. |
|
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |
|
| The API request timed out after the limit of 360 seconds. Try the request again, if the error persists, please reach out to support@synopticdata.com. |
403 - Authorization error
403 errors are directly tied to the levels of access an account and its access credentials have. If you receive one of these errors, refer to the features outlined with your usage tier on our pricing page or your signed commercial agreement.
{
SUMMARY: {
NUMBER_OF_OBJECTS: 0,
RESPONSE_CODE: 403,
VERSION: "v2.21.1",
RESPONSE_MESSAGE: "Account associated with this token does not have access to the precipitation service. Please see our Enterprise Service options at https://synopticdata.com/enterprise, or contact us at account@synopticdata.com",
RESPONSE_TIME: 0
}
}
Possible response code 403 messages:
Message | Description |
---|---|
| The token and its associated account does not have access enabled for the Weather API. |
| The token and its associated account does not have access to the Advanced Precipitation service. Please review the features associated with your contract on our pricing page. |
| The token and its associated account does not have access to the Advanced Precipitation service. Please review the features associated with your contract on our pricing page. |
| The token and its associated account does not have access to Advanced QC. Please review the features associated with your contract on our pricing page. |
| The token and its associated account does not have access to Basic Precipitation through Time Series. Please review the features associated with your contract on our pricing page. |
| The token and its associated account does not have access to historical data x year(s) before the current time. Please review the features associated with your contract on our pricing page. |
| The token and its associated account does not have access to one (or more) of the following requested parameters:
Please review the features associated with your contract on our pricing page. |
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |
404 - URL not found
These errors will occur if an incorrect URL is requested.
{
SUMMARY: {
RESPONSE_CODE: 404,
VERSION: "v2.21.3",
RESPONSE_MESSAGE: "Requested URL not found. See https://developers.synopticdata.com/mesonet/ for valid webservices.",
RESPONSE_TIME: "0 ms"
}
}
Possible response code 404 messages:
Message | Description |
---|---|
| The entered subdomain is correct |
500 - Internal Error
Errors internal to the API. If you continually receive one of these errors, please reach out to support@synopticdata.com with your query URL and indicate the account associated with the token.
{
SUMMARY: {
RESPONSE_CODE: 500,
VERSION: "v2.21.1",
RESPONSE_MESSAGE: "Internal error occurred.",
RESPONSE_TIME: "0 ms"
}
}
Possible response code 500 messages:
Message | Description |
---|---|
| If you receive this error reach out to support@synopticdata.com with your query URL and indicate the account associated with the token. |