mirror of
https://github.com/tale/headplane.git
synced 2026-08-19 09:26:18 +00:00
feat: better error handling for oidc api key
This also ships with a better error page
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
export default class ResponseError extends Error {
|
||||
status: number;
|
||||
response: string;
|
||||
requestUrl: string;
|
||||
responseObject?: Record<string, unknown>;
|
||||
|
||||
constructor(status: number, response: string, requestUrl: string) {
|
||||
@@ -10,6 +11,7 @@ export default class ResponseError extends Error {
|
||||
this.name = 'ResponseError';
|
||||
this.status = status;
|
||||
this.response = response;
|
||||
this.requestUrl = requestUrl;
|
||||
|
||||
try {
|
||||
// Try to parse the response as JSON to get a response object
|
||||
|
||||
Reference in New Issue
Block a user