try: response = Image.upload(FlaskAdapter(request), "/public/", options) except Exception: response = {"error": str(sys.exc_info()[1])} return json.dumps(response)