catch the server side error inside iframe when upload fails

Fixes #13.