• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks Dictionary of Api Codes?

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old Oct-11-2012, 01:21 PM
#1
apiHacker is offline apiHacker OP
Beginner grinner
Dictionary of Api Codes?
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.
Old Oct-11-2012, 02:12 PM
#2
Allen is online now Allen
"tweak 'til it squeaks"
Allen's Avatar
Did you "Google" "Dictionary of Api Codes"?
Old Oct-11-2012, 02:52 PM
#3
apiHacker is offline apiHacker OP
Beginner grinner
Yep...didn't see any smugmug specific listing of api codes. In my experience most service providers will utilize the actual http code. Since everything seems to be a 200 and requires inspection of the response body, you would think custom codes smugmug provides would be more readily documented. We really would like to be able acknowledge whatever they are trying to tell us. Since some requests process fine and some dont we are in a sticky situation - - should we just keep retrying all 30k queued up actions? I'm sure they wont appreciate it especially when we retry on failure.
Old Oct-12-2012, 01:18 AM
#4
rainforest1155 is offline rainforest1155
with a Heroes touch
rainforest1155's Avatar
I'm no developer, but it might be helpful if you could post the detailed API request you sent and the full response you received.
__________________
Sebastian
SmugMug Support Hero

look on the bright side
http://www.SebastianHosche.com
Old Oct-12-2012, 05:05 AM
#5
David PL is offline David PL
Big grins
Quote:
Originally Posted by apiHacker View Post
...

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?
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).
Tell The World!  
Similar Threads Thread Starter Forum Replies Last Post
Smugmug API 1.3.0 MSkaffari SmugMug APIs, Hacks & Tricks 14 Jun-05-2012 07:51 AM
Smugmug API Issues (mostly around video embed codes) winston SmugMug APIs, Hacks & Tricks 8 Feb-28-2011 08:05 PM
API Update Archive devbobo SmugMug APIs, Hacks & Tricks 0 Oct-09-2007 04:16 PM
stuck on smugmug.images.upload API call crenner SmugMug APIs, Hacks & Tricks 5 Sep-04-2006 09:12 PM
API method requests TazzyTazzy SmugMug APIs, Hacks & Tricks 1 Jun-21-2006 06:35 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump