Catch upload errors

This example shows how to catch the error response from the server for the image or file uploading.