Skip to content

Commit

Permalink
check if response not ok condition met
Browse files Browse the repository at this point in the history
  • Loading branch information
birm authored Jan 9, 2025
1 parent 37e21c4 commit 773753c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/PathdbMods.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ async function PathDbMods() {
'Authorization': 'Bearer ' + getCookie("token"),
})
}).then(function(response) {
if (!response.ok) return {
if (!response.ok)
console.log("response not ok", response.statusText)
return {
error: !response.ok,
text: response.statusText,
url: response.url
Expand All @@ -120,7 +122,9 @@ async function PathDbMods() {
'Authorization': 'Bearer ' + getCookie("token"),
})
}).then(function(response) {
if (!response.ok) return {
if (!response.ok)
console.log("response not ok", response.statusText)
return {
error: !response.ok,
text: response.statusText,
url: response.url
Expand Down

0 comments on commit 773753c

Please sign in to comment.