API return and Openweather return

API RETURN

UNKNOWN ERROR = 0


 

BLE ERROR = -1 

probably a error with the bluetooth or connection with you phone. Verify connection


 

BLE HOST TIMEOUT = -2

 probably a error with the bluetooth or connection with you phone. Verify connection


BLE SERVER TIMEOUT = -3

probably a error with the bluetooth or connection with you phone. Verify connection 


BLE NO DATA = -4

probably a error with the bluetooth or connection with you phone. Verify connection 



BLE REQUEST CANCELLED = -5

 

BLE QUEUE FULL = -101

The buffer is full. Change your watch face. If problem persists, power off/on your watch


 

BLE REQUEST TOO LARGE = -102

 

BLE UNKNOWN SEND ERROR = -103

probably a bad send to the API

 

BLE CONNECTION UNAVAILABLE = -104

verify your BT connection or garmin connect on your phone. Maybe you're too far from your phone


 

INVALID HTTP HEADER FIELDS IN REQUEST = -200

bad request to API

 

INVALID HTTP BODY IN REQUEST = -201

bad request to API

 

INVALID HTTP METHOD IN REQUEST = -202

bad request to API

 

NETWORK REQUEST TIMED OUT = -300

response is too long. A timeout in API.

 

INVALID HTTP BODY IN NETWORK RESPONSE = -400

the API response is bad formated


INVALID HTTP HEADER FIELDS IN NETWORK RESPONSE = -401

the API response is bad formated

 

NETWORK RESPONSE TOO LARGE = -402

the API response is bad formated and the response is too big for the watch

 

NETWORK RESPONSE OUT OF MEMORY = -403

the API response is bad formated and the response is too big for the watch

 

STORAGE FULL = -1000

power off/on the watch


SECURE CONNECTION REQUIRED = -1001

API doesn't accept the connection

 

UNSUPPORTED CONTENT TYPE IN RESPONSE = -1002

API returns a bad response, and the watch doesn't understand

 

REQUEST CANCELLED = -1003

timeout with the API

 

REQUEST CONNECTION DROPPED = -1004

timeout with the API 

OPENWEATHER  RETURN

API calls return an error 401

You can get the error 401 in the following cases:

Starting from 9 October 2015 our API requires a valid APPID for access. Note that this does not mean that our API is subscription-only now - please take a minute to register a free account to receive a key.

For FOSS developers: we welcome free and open source software and are willing to help you. If you want to use OpenWeather data in your free software application please register an API key and file a ticket describing your application and API key registered. OpenWeather will review your request lift access limits for your key if used in open source application.

API calls return an error 404

You can get this error in the following cases:

API calls return an error 429

You will get the error 429 if you have free tariff and make more than 60 API calls per minute.

Please switch to a subscription plan that meets your needs or reduce the number of API calls in accordance with the established limits.


API RETURN for METAR or TAF (I use avwx API)

HTTP Codes

Here is a list of all supported HTTP status codes. Many non-200 responses include a sample response for development purposes, but it will always be in a "sample" field as to not conflict with successful fulfillment workflows.

200 Success

Normal success response for the requested resource.

204 No Data

This occurs when the data source doesn't return a report for the requested station or the station is known to not submit reports to the data source. This second field is usually static, so subsequent calls will also return a 204 code.

400 Client Error

Most 400 client errors are due to invalid URL parameters or unknown ICAO codes. AVWX only accepts 4-character ICAO codes of currently operating stations. Closed airports, IATA codes, and non-ICAO GPS codes are not recognized.

You may also receive this if no report is found from the data sources and nothing is available in the cache.

401 Missing Authorization

The endpoint requires authorization to access. Be sure to include your API token in the request header or as a URL parameter.

403 Unauthorized

The API token was rejected for one of the following reasons:

429 Too Many Requests

The user's account or token has hit it's daily call limit. You can view your recent usage from the account portal. If you need to increase your call limit, you can upgrade your plan or opt-in to overage billing.

500 Unknown Server Error

Error representing a code error not handled by any other HTTP code. Bug reports are automatically submitted for review. Subsequent retries are likely to fail.

502 Cannot Connect to Data Source

There was an issue fetching a report from the data source. This is usually a temporary issue and retries can be made shortly after.

503 Server Rebooting

The server is being updated and the request has been cancelled. Retry your connection immediately for the request to be queued.