ArcGIS Server REST API, error codes documentation?

10356
6
Jump to solution
06-30-2017 11:55 PM
FlavieMORAUX1
Frequent Contributor

Hy,

Do you know it there is documentation of error codes in ArcGIS Server API REST ?

Here is what i am looking for :

  • JSON structure of result in cas of error
  • List of error codes

I try to find it in online documentation (ArcGIS Server REST API)... but without success.

Thank you in advance,

Flavie

0 Kudos
1 Solution
6 Replies
FlavieMORAUX1
Frequent Contributor

Shan,

Than you for all informations, it will be useful to me! 

I use ArcGIS Server 10.3.1.

And I found JSON structure by testing a case in error 

{

"error": {

  "code": 500,

  "message": "DIRECTORY/SERVICE/MapServer not found ",

  "details": []

}

}

Regards,

Flavie

JeffBurgess
Emerging Contributor

I just stumbled across this post because I have the same question.

The links that Shan sent refer to server codes as seen in the log, not codes as returned by the ArcGIS REST API when making HTTP requests.

As seen in Flavie's example above, 500 is often returned when something's really wrong, like you used the wrong map service URL for a query or there's an internal server error. From memory, I seem to recall that you get a 498 error when a server is using the legacy "tokens" authentication method and the token is invalid. I've seen 499 errors too, but I don't recall what problem a 499 describes.

Anecdotally, I have noticed that the error series follows HTTP error code series (4XX errors are a problem with the client's request, and 5XX errors are a problem on the server). But that doesn't really help when you're trying to understand the range of possible codes.

A list of possible ArcGIS REST API codes (along with their meaning) would be quite helpful.

-Jeff

MikeDolbow
Regular Contributor

Yeah, none of the docs above are what I'm looking for, either. It's pretty easy to force a bad token so I know at least one error code out of the REST API:

{"error":{"code":498,"message":"Invalid Token","details":[]}}

but...seriously, there's no others? Pretty sure a timeout can happen too. Gotta be a list somewhere.

0 Kudos
MikeDolbow
Regular Contributor

Jeez, found them. WHY does it always take ten (Google) searches to find stuff like this? Service output—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers