Skip to content

Commit

Permalink
check response status
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumewuip committed Aug 28, 2023
1 parent 3412d2a commit c34237e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rss-to-tana/tana.js
Expand Up @@ -33,7 +33,7 @@ function postItems(items) {
body: JSON.stringify(payload)
})
.then(response => {
if (!response.ok) {
if (!response.ok || response.status !== 200) {
throw new Error(`Error saving nodes: ${response.status} ${response.statusText}`)
}
})
Expand Down

0 comments on commit c34237e

Please sign in to comment.