Skip to main content

validation_error_response

Function validation_error_response 

Source
pub fn validation_error_response(errors: &ValidationErrors) -> AuthResponse
Expand description

Convert validator::ValidationErrors into a standardized error response body.

Returns a 400 response with { "code": "VALIDATION_ERROR", "message": "[body.field] ..." } matching the TS better-auth error shape.