Skip to content

Commit

Permalink
Merge pull request #633 from storyblok/fix-int-1013-js-status-return
Browse files Browse the repository at this point in the history
fix(int-1013): adding status check
  • Loading branch information
Thiago Saife authored Aug 11, 2023
2 parents 5d174b0 + a31432d commit f19f177
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ class Storyblok {
try {
const res = await this.throttle('get', url, params)

if (res.status !== 200) {
return reject(res)
}

let response = { data: res.data, headers: res.headers } as ISbResult

if (res.headers?.['per-page']) {
Expand Down

0 comments on commit f19f177

Please sign in to comment.