fix: don't swallow fetch errors (#30496)
This commit is contained in:
@@ -178,9 +178,7 @@ export class MachineLearningRepository {
|
||||
`Machine learning request to "${url}" failed with status ${response.status}: ${response.statusText}`,
|
||||
);
|
||||
} catch (error: Error | unknown) {
|
||||
this.logger.warn(
|
||||
`Machine learning request to "${url}" failed: ${error instanceof Error ? error.message : error}`,
|
||||
);
|
||||
this.logger.warn(`Machine learning request to "${url}" failed`, error);
|
||||
}
|
||||
|
||||
this.setHealthy(url, false);
|
||||
|
||||
@@ -123,8 +123,7 @@ export class OAuthRepository {
|
||||
);
|
||||
}
|
||||
|
||||
this.logger.error(`OAuth login failed: ${error.message}`);
|
||||
this.logger.error(error);
|
||||
this.logger.error('OAuth login failed', error);
|
||||
|
||||
throw new Error('OAuth login failed', { cause: error });
|
||||
}
|
||||
@@ -223,7 +222,7 @@ export class OAuthRepository {
|
||||
},
|
||||
);
|
||||
} catch (error: any | AggregateError) {
|
||||
this.logger.error(`Error in OAuth discovery: ${error}`, error?.stack, error?.errors);
|
||||
this.logger.error('Error in OAuth discovery', error);
|
||||
throw new InternalServerErrorException(`Error in OAuth discovery: ${error}`, { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user