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

Lines changed: 1 addition & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy