Partilhar via


REST API Status Codes and Error Handling

Note

Bing Maps for Enterprise service retirement

Bing Maps for Enterprise is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps for Enterprise services until June 30th, 2025. Enterprise account customers can continue to use Bing Maps for Enterprise services until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps for Enterprise REST APIs and SDKs will need to be updated to use Azure Maps by the retirement date that applies to your Bing Maps for Enterprise account type.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

Information on status codes and error handling.

Handling empty responses

Occasionally, the servers processing service requests can be overloaded, and you may receive some responses that contain no results for queries that you would normally receive a result. To identify this situation, check the HTTP headers of the response. If the HTTP header X-MS-BM-WS-INFO is set to 1, it is best to wait a few seconds and try again.

This may happen occasionally for Basic or Trial Bing Maps Keys, and rarely for Enterprise Bing Maps Keys. If you are experiencing this behavior continually with an Enterprise Bing Maps Key, contact Bing Maps Enterprise Support.

HTTP Status Codes

Each response to a request provides an HTTP status code. The following table lists the most common HTTP status codes. Additional information may be provided with a specific request.

HTTP Status Code Short Description Details
200 OK The request is successful.
201 Created A new resource is created.
202 Accepted The request has been accepted for processing.
400 Bad Request The request contained an error.
401 Unauthorized Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation.
403 Forbidden The request is for something forbidden. Authorization will not help.
404 Not Found The requested resource was not found.
429 Too Many Requests The user has sent too many requests in a given amount of time. The account is being rate limited.
500 Internal Server Error Your request could not be completed because there was a problem with the service.
503 Service Unavailable There's a problem with the service right now. Please try again later.