Skip to main content

service_error_response

Function service_error_response 

Source
pub fn service_error_response<T>(
    err: &ServiceError,
) -> (StatusCode, Json<ApiResponse<T>>)
Expand description

The response for a failed ServiceError, for handlers outside the generic CRUD handler (a generated state-machine transition, a custom route) that call the service directly — the same answer the generic handler gives (see service_error_status). A 500 carries INTERNAL_ERROR_MESSAGE; the error itself is logged.