8000 Remove `any` in `catch` · optimizely/javascript-sdk@ef8dc52 · GitHub
[go: up one dir, main page]

Skip to content

Commit ef8dc52

Browse files
Remove any in catch
1 parent b8ba347 commit ef8dc52

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/optimizely-sdk/lib/plugins/odp/graphql_manager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ export class GraphqlManager implements IGraphQLManager {
117117

118118
try {
119119
jsonObject = JSON.parse(jsonResponse);
120-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
121-
} catch (error: any) {
120+
} catch (error) {
122121
this._errorHandler.handleError(error);
123122
this._logger.log(LogLevel.ERROR, 'Attempted to parse invalid segment response JSON.');
124123
return EMPTY_JSON_RESPONSE;

packages/optimizely-sdk/lib/plugins/odp/odp_client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ export class OdpClient implements IOdpClient {
9999
try {
100100
const request = this._requestHandler.makeRequest(url, headers, method, data);
101101
response = await request.responsePromise;
102-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
103-
} catch (error: any) {
102+
} catch (error) {
104103
this._errorHandler.handleError(error);
105104
this._logger.log(LogLevel.ERROR, `${FETCH_FAILURE_MESSAGE} (${error.statusCode ?? < 3CDA span class=pl-s>'network error'})`);
106105

0 commit comments

Comments
 (0)
0