Add custom image from errors thrown by the API

This commit is contained in:
CEC
2022-04-19 10:50:01 +02:00
parent ec2b23f32f
commit 5d360c8770
4 changed files with 18 additions and 37 deletions
+2 -12
View File
@@ -22,6 +22,7 @@ import {
FollowAbortMessage,
VariableMessage,
LockGroupPromptMessage,
ErrorScreenMessage
} from "../Messages/generated/messages_pb";
import { UserMovesMessage } from "../Messages/generated/messages_pb";
import { parse } from "query-string";
@@ -486,18 +487,7 @@ export class IoSocketController {
} else if (ws.reason === "textureInvalid") {
socketManager.emitInvalidTextureMessage(ws);
} else if (ws.reason === "error") {
socketManager.emitErrorScreenMessage(
ws,
ws.error.type,
ws.error.code,
ws.error.title,
ws.error.subtitle,
ws.error.details,
ws.error.timeToRetry,
ws.error.canRetryManual,
ws.error.urlToRedirect,
ws.error.buttonTitle
);
socketManager.emitErrorScreenMessage(ws, ws.error as ErrorScreenMessage);
} else {
socketManager.emitConnexionErrorMessage(ws, ws.message);
}