MCPcopy Create free account
hub / github.com/etesync/server / transform_validation_error

Function transform_validation_error

etebase_server/fastapi/exceptions.py:121–128  ·  view source on GitHub ↗
(prefix: str, err: DjangoValidationError)

Source from the content-addressed store, hash-verified

119
120
121def transform_validation_error(prefix: str, err: DjangoValidationError):
122 if hasattr(err, "error_dict"):
123 errors = flatten_errors(prefix, err.error_dict)
124 elif not hasattr(err, "message"):
125 errors = flatten_errors(prefix, err.error_list)
126 else:
127 raise HttpError(err.code or "validation_error", err.message)
128 raise HttpError(code="field_errors", detail="Field validations failed.", errors=errors)

Callers 2

signup_saveFunction · 0.85
item_createFunction · 0.85

Calls 2

flatten_errorsFunction · 0.85
HttpErrorClass · 0.85

Tested by

no test coverage detected