initial implementation

This commit is contained in:
Konstantin Schaper
2020-08-20 17:44:36 +02:00
parent 330f7c500e
commit 44edb48771
6 changed files with 205 additions and 14 deletions

View File

@@ -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) {