Catch exceptions and return 'internal-server-error'