This started when I noticed that flickr.galleries.getListForPhoto returns error code 1 if you don't pass any arguments, which would throw a ResourceNotFound error. That's bad!
I started looking at how best to do this, and realised that having all the exception mapping code inside the base API was bad – now I've pushed it out into the individual methods, which allows me to write more human-readable error messages, and keep all the error code mapping for each API method in one place. 💪
This started when I noticed that
flickr.galleries.getListForPhoto
returns error code 1 if you don't pass any arguments, which would throw aResourceNotFound
error. That's bad!I started looking at how best to do this, and realised that having all the exception mapping code inside the base API was bad – now I've pushed it out into the individual methods, which allows me to write more human-readable error messages, and keep all the error code mapping for each API method in one place. 💪