fix: 500 server error when files.create request is closed by client (#5878)
This commit is contained in:
@@ -26,11 +26,9 @@ export function InvalidAuthenticationError(
|
||||
});
|
||||
}
|
||||
|
||||
export function AuthorizationError(
|
||||
message = "You do not have permission to access this resource"
|
||||
) {
|
||||
export function AuthorizationError(message = "Authorization error") {
|
||||
return httpErrors(403, message, {
|
||||
id: "permission_required",
|
||||
id: "authorization_error",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -200,3 +198,11 @@ export function AuthenticationProviderDisabledError(
|
||||
id: "authentication_provider_disabled",
|
||||
});
|
||||
}
|
||||
|
||||
export function ClientClosedRequestError(
|
||||
message = "Client closed request before response was received"
|
||||
) {
|
||||
return httpErrors(499, message, {
|
||||
id: "client_closed_request",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user