aboutsummaryrefslogtreecommitdiff
path: root/gn3/errors.py
AgeCommit message (Collapse)Author
2024-08-29Add logging for gn llm errors.Alexander_Kabui
2024-05-24Initiliaze second args to LLMError as query parameter.Alexander_Kabui
2024-05-24Return first argument as error message.Alexander_Kabui
2024-05-22Register LLM error in app.Alexander_Kabui
* do refactoring for gn3:llm:errors
2024-03-04Check for exception args and provide traceback.Frederick Muriuki Muriithi
2024-03-04Handle generic exceptions gracefully.Frederick Muriuki Muriithi
2024-02-25Correctly handle URLError.Munyoki Kilyungi
Using the `internal_server_error` function to handle URLError raised an exception because the `pnf` exception did not have some attributes. * gn3/errors.py (url_server_error): New function. (register_error_handlers): Register above function to handle URLError. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-02-14Delete type hints from handle_sparql_errors.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-02-14Minor pep-8 fixes.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-02-14Handle sparql errors at the app level.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-01-30Add the traceback to the exceptions for display.Frederick Muriuki Muriithi
2023-10-26case-attribute: Fix linting errors.Frederick Muriuki Muriithi
2023-10-19Handle 404 error(s) at top level.Frederick Muriuki Muriithi
2023-06-05Handle unhandled SQLite3 errors.Frederick Muriuki Muriithi
2023-05-29Enable Administrator login on GN3Frederick Muriuki Muriithi
* gn3/auth/authentication/oauth2/views.py: Remove endpoint * gn3/auth/authorisation/users/admin/__init__.py: New admin module * gn3/auth/authorisation/users/admin/ui.py: New admin module * gn3/auth/authorisation/users/admin/views.py: New admin module * gn3/auth/views.py: Use new admin module * gn3/errors.py: Fix linting errors * gn3/templates/login.html: New html template * main.py: Fix linting errors
2023-05-27Document Use of OAuth2 ClientsFrederick Muriuki Muriithi
* docs/authentication_and_authorisation/oauth2_clients.md: New documentation * gn3/auth/authentication/oauth2/server.py: Raise appropriate error if no client is found. * gn3/auth/authentication/oauth2/views.py: Handle exception in the case where a UI should be presented to the user, rather than presenting the raw JSON response to the user. * gn3/errors.py: Handle any authlib OAuth2Error at the application's top-level * gn3/templates/oauth2/oauth2_error.html: Handle any authlib OAuth2Error at the application's top-level
2023-01-28auth: Store error_code in Exception for flexibilityFrederick Muriuki Muriithi
To allow for different error codes for the various exceptions, store the error_code in the exception objects and retrieve it from there when generating the response.
2023-01-04auth: Add `/register-user` endpointFrederick Muriuki Muriithi
* gn3/app.py: register top-level error handlers. reorganise oauth2 blueprint. * gn3/auth/__init__.py: reorganise oaut2 blueprint. * gn3/auth/authentication/oauth2/views.py: reorganise oauth2 blueprint. * gn3/auth/authorisation/exceptions.py -> gn3/auth/authorisation/errors.py * gn3/auth/authorisation/groups.py: rename file/module * gn3/auth/authorisation/resources.py: rename file/module * gn3/auth/authorisation/views.py: Add `/register-user` endpoint * gn3/auth/blueprint.py: reorganise oauth2 blueprint. * gn3/errors.py: register top-level error handlers.