Skip to content

Commit

Permalink
chore: fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoerpenbeck committed Oct 16, 2024
1 parent cce90ff commit 2137d5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/common/httpClient/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ export class FetchError extends Error {
};

type: ErrorType;
errors?: any[];
status: number;
statusText: string;

constructor(status: number, statusText: string, body?: any) {
constructor(status: number, statusText: string) {
super(statusText);
this.name = FetchError.NAME;
this.type = ErrorType.HTTP;
this.status = status;
this.statusText = statusText;
if (body) {
this.errors = body.errors;
}
}
}

Expand Down Expand Up @@ -61,7 +57,6 @@ export class FftApiError extends FftSdkError {
return FftSdkError.isSdkError(error) && error.name === FftApiError.NAME && error.type === ErrorType.RESPONSE;
}

errors: any[] = [];
status?: number;
statusText?: string;

Expand Down Expand Up @@ -93,7 +88,6 @@ export const handleError = (error: unknown): never => {
apiError.type = ErrorType.RESPONSE;
apiError.status = error.status;
apiError.statusText = error.statusText;
apiError.errors = error.errors || [];
if (!apiError.message && apiError.statusText) {
apiError.message = apiError.statusText;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/httpClient/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class HttpClient implements BasicHttpClient {
}

if (!response.ok) {
throw new FetchError(response.status, response.statusText, responseBody);
throw new FetchError(response.status, response.statusText);
}

return {
Expand Down

0 comments on commit 2137d5a

Please sign in to comment.