Skip to content

Commit b140983

Browse files
authored
refactor: clean up api/error.ts (#4542)
This removes an eslint-disable lint and updates the `err` type to `unknown` instead of `any` which is more correct.
1 parent 94db085 commit b140983

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

site/src/api/errors.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export type ApiError = AxiosError<ApiErrorResponse> & {
2323
response: AxiosResponse<ApiErrorResponse>
2424
}
2525

26-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
27-
export const isApiError = (err: any): err is ApiError => {
26+
export const isApiError = (err: unknown): err is ApiError => {
2827
if (axios.isAxiosError(err)) {
2928
const response = err.response?.data
3029
if (!response) {

0 commit comments

Comments
 (0)