Skip to content

Commit

Permalink
Merge pull request #435 from storyblok/fix-int-797-readme-update
Browse files Browse the repository at this point in the history
fix(int 797): update readme file
  • Loading branch information
Thiago Saife authored Feb 1, 2023
2 parents 836f9e5 + 7450033 commit f039a84
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,33 @@ One can remove the reponseInterceptor at any time, by calling the function `ejec
Storyblok.ejectInterceptor()
```

### Error handling

Exceptions will be thrown as an object with the following structure:

```javascript
{
message: Error // an Error object with the error message
status: number
response: ISbResponse
}
```

where,

```typescript
interface ISbResponse {
data: any
status: number
statusText: string
headers: any
config: any
request: any
}
```

One should catch the exception and handle it accordingly.

### Method `Storyblok#get`

With this method you can get single or multiple items. The multiple items are paginated and you will receive 25 items per page by default. If you want to get all items at once use the `getAll` method.
Expand Down

0 comments on commit f039a84

Please sign in to comment.