Skip to content

Commit

Permalink
fix: auth/config response should never cause errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grgrzybek authored and phantomjinx committed May 13, 2024
1 parent 164a167 commit 8faf1cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/hawtio/src/plugins/auth/oidc/oidc-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class OidcService implements IOidcService {
constructor() {
this.config = fetchPath<OidcConfig | null>('auth/config', {
success: (data: string) => {
return JSON.parse(data)
try {
return JSON.parse(data)
} catch {
return null
}
},
error: () => null,
})
Expand Down

0 comments on commit 8faf1cb

Please sign in to comment.