Dictionary of Api Codes?
apiHacker
Registered Users Posts: 2 Beginner grinner
Hello,
I am trying to understand why a particular api end point is failing. Unfortunately I cannot find any documentation regarding the internal 'codes' smugmug uses. Additionally, the responses are so generic there is no way to intelligently determine what the error reason is. Having worked on over 30 different api endpoints, this is up there with the most useless responses.
So can someone please tell me what:
{"stat":"fail","code":5,"message":"system error"}
Means in the context of uploading an image? Is the system over capacity, is the method signed wrong, is it a duplicate file, does it meet some other unpublished application limitation, are we rate limited, is our request formatted bad, are we not authorized, why the hell do I get an Http 200?
Insight would be appreciated.
I am trying to understand why a particular api end point is failing. Unfortunately I cannot find any documentation regarding the internal 'codes' smugmug uses. Additionally, the responses are so generic there is no way to intelligently determine what the error reason is. Having worked on over 30 different api endpoints, this is up there with the most useless responses.
So can someone please tell me what:
{"stat":"fail","code":5,"message":"system error"}
Means in the context of uploading an image? Is the system over capacity, is the method signed wrong, is it a duplicate file, does it meet some other unpublished application limitation, are we rate limited, is our request formatted bad, are we not authorized, why the hell do I get an Http 200?
Insight would be appreciated.
0
Comments
My Website index | My Blog
SmugMug Support Hero
I would also like to see all of the possible error codes identified (in particular for uploading) to allow for more robust error handling by applications using the api.
From my own testing with the API, it seems that in the context of uploading, Error 5 (system error) is returned for any instance where an upload was made but rejected by SmugMug. If you then go into your SmugMug upload log (in your control panel), that provides more descriptive details of the actual error (such as, invalid file type, incomplete file, etc). It would be very helpful if that same logic already in place that is used to generate the upload error log would be part of the API's error response logic. For example, instead of "system error" as the message, use the same message that would be added to the upload log ("invalid file type", etc). That would provide very useful information that we could build into our applications to better determine what action our application should take (notify user for how to correct the problem file, not have our application retry upload of the same file if it is inevitable retrying will fail, etc).