mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
initial implementation
This commit is contained in:
@@ -120,7 +120,12 @@ function handleFailure(response: Response) {
|
||||
if (!response.ok) {
|
||||
if (isBackendError(response)) {
|
||||
return response.json().then((content: BackendErrorContent) => {
|
||||
throw createBackendError(content, response.status);
|
||||
if (content.errorCode === "DDS8D8unr1") {
|
||||
window.location.replace(`${contextPath}/login`);
|
||||
throw new UnauthorizedError("Unauthorized", 401);
|
||||
} else {
|
||||
throw createBackendError(content, response.status);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (response.status === 401) {
|
||||
|
||||
Reference in New Issue
Block a user