diff --git a/src/error.rs b/src/error.rs index 796183fc0..7158d7e7a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -559,6 +559,7 @@ enum InternalErrorType { } impl InternalError { + /// Create `InternalError` instance pub fn new(cause: T, status: StatusCode) -> Self { InternalError { cause, @@ -567,6 +568,7 @@ impl InternalError { } } + /// Create `InternalError` with predefined `HttpResponse` pub fn from_response(cause: T, response: HttpResponse) -> Self { InternalError { cause,