Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
danjoa committed Oct 25, 2023
1 parent f1ff170 commit 7a34b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srv/notifyToRest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function postNotification(notificationData) {
const message = err.response.data?.error?.message?.value ?? err.response.message;
const error = new cds.error(message);

if (String(err.response?.status).match(/^4\d\d$/) && err.response?.status !== 429) {
if (/^4\d\d$/.test(err.response?.status) && err.response?.status != 429) {
error.unrecoverable = true;
}

Expand Down

0 comments on commit 7a34b5e

Please sign in to comment.