Skip to content

Commit

Permalink
database error code
Browse files Browse the repository at this point in the history
  • Loading branch information
tfloxolodeiro committed Jun 27, 2023
1 parent 94b7268 commit 592649e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/analytics/routes/errorHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const parseMongoError = (code: number | string) => {
case 11000:
return 'Duplicate key error.'
default:
return 'Database error.'
return `Database error. Code: ${code}`
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/routes/errorHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const parseMongoError = (code: number | string) => {
case 11000:
return 'Duplicate key error.'
default:
return 'Database error.'
return `Database error. Code: ${code}`
}
}

Expand Down

0 comments on commit 592649e

Please sign in to comment.