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 committed May 13, 2024
1 parent a25eeba commit 3fa9053
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 3fa9053

Please sign in to comment.