Skip to content

Commit

Permalink
Fix: [AEA-0000] - Removes config from Axios Error (#219)
Browse files Browse the repository at this point in the history
## Summary

- Routine Change

### Details

Removes config element from Axios error log to avoid private key leakage
  • Loading branch information
JackSpagnoliNHS authored Sep 20, 2024
1 parent 90274e5 commit 902fab7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export function handleErrorResponse(logger: Logger, response: AxiosResponse) {
}

export function handleCallError(logger: Logger, error: unknown) {
if (error["config"]){
delete error["config"]
}

if (axios.isAxiosError(error)) {
if (error.response) {
logger.error("error in response from spine", {
Expand Down

0 comments on commit 902fab7

Please sign in to comment.