Skip to content

Commit

Permalink
fix: use specific type on return
Browse files Browse the repository at this point in the history
  • Loading branch information
merll committed Oct 29, 2024
1 parent bcecbd9 commit 6798322
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tasks/keycloak/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { HttpError as KeyCloakHttpError } from '@linode/keycloak-client-node'

export class WrappedError extends Error {}

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function extractError(operationName: string, error: any): any {
export function extractError(operationName: string, error: Error): WrappedError {
if (error instanceof WrappedError) return error
let errorDetail: any
if (error instanceof KeyCloakHttpError || error instanceof K8sHttpError) {
Expand Down

0 comments on commit 6798322

Please sign in to comment.