Fixes #56 - Returning an error to the client if the image was not succes...

Hi,

I am sending a PR for the #56 

I am checking for the presence of the word errorDetail in the response. Please let me know if there is a more efficient solution than this.