From 9058b01d6c0e3d1e9e485a537258a312ccfc841c Mon Sep 17 00:00:00 2001 From: mrw1593 Date: Tue, 27 Jun 2023 20:41:34 -0400 Subject: Error handling --- static/languages/en.ini | 4 ++++ static/scripts/tsconfig.json | 12 ++++++++++++ static/templates/login.html | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 static/scripts/tsconfig.json (limited to 'static') diff --git a/static/languages/en.ini b/static/languages/en.ini index e926ec0..32adc51 100644 --- a/static/languages/en.ini +++ b/static/languages/en.ini @@ -5,6 +5,8 @@ passwordLabel = Password passwordPlaceholder = Enter your password loginSubmitButton = Log In +loginErrorMessage = Incorrect username or password. + errorTitle = Error errorHeader_invalidRequest = Invalid Request errorMessage_invalidRequest = The client sent a bad request. @@ -14,3 +16,5 @@ errorHeader_missingRedirectUri = Missing Redirect URI errorMessage_missingRedirectUri = There are many redirect URIs for the client, but the client did not specify which one to use. errorHeader_invalidRedirectUri = Invalid Redirect URI errorMessage_invalidRedirectUri = The client provided a redirect URI that it is not allowed to redirect to. +errorHeader_internalServerError = Server Error +errorMessage_internalServerError = An unexpected error occurred. diff --git a/static/scripts/tsconfig.json b/static/scripts/tsconfig.json new file mode 100644 index 0000000..9103384 --- /dev/null +++ b/static/scripts/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "strict": true, + "noFallthroughCasesInSwitch": true, + "exactOptionalPropertyTypes": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "lib": ["DOM"], + "target": "ES6" + } +} \ No newline at end of file diff --git a/static/templates/login.html b/static/templates/login.html index 5de9bc9..325dc14 100644 --- a/static/templates/login.html +++ b/static/templates/login.html @@ -2,6 +2,9 @@ {% block title %}{{ msg(key="loginTitle") }}{% endblock title %} {% block content %}
+ {% if errorMessage %} +

{{ msg(key=errorMessage) }}

+ {% endif %} -- cgit v1.2.3