def errors_from_deserialization_exceptions(exceptions, included=False):
 def _to_error(exception):
  detail = exception.message()
  status = exception.status
  return error(status=status, detail=detail)
 errors = list(map(_to_error, exceptions))
 if (len(errors) == 1):
  status = errors[0]['status']
 else:
  status = 400
 return errors_response(status, errors)

def errors_from_deserialization_exceptions ( exceptions , included = False ) : def _to_error ( exception ) : detail = exception . message ( ) status = exception . status return error ( status = status , detail = detail ) errors = list ( map ( _to_error , exceptions ) ) if ( len ( errors ) == 1 ) : status = errors [ 0 ] [ 'status' ] else : status = 400 return errors_response ( status , errors )
returns an errors response object .