Skip to content

Commit

Permalink
Add docs from gofiber/fiber@f08ebf4
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 25, 2024
1 parent 7cb8756 commit ddfd8fb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/core/api/bind.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,23 @@ The `MIMETypes` method is used to check if the custom binder should be used for

For more control over error handling, you can use the following methods.

### Must
### WithAutoHandling

If you want to handle binder errors automatically, you can use `Must`.
If you want to handle binder errors automatically, you can use `WithAutoHandling`.
If there's an error, it will return the error and set HTTP status to `400 Bad Request`.
This function does NOT panic therefor you must still return on error explicitly

```go title="Signature"
func (b *Bind) Must() *Bind
func (b *Bind) WithAutoHandling() *Bind
```

### Should
### WithoutAutoHandling

To handle binder errors manually, you can use the `Should` method.
To handle binder errors manually, you can use the `WithoutAutoHandling` method.
It's the default behavior of the binder.

```go title="Signature"
func (b *Bind) Should() *Bind
func (b *Bind) WithoutAutoHandling() *Bind
```

## SetParserDecoder
Expand Down

0 comments on commit ddfd8fb

Please sign in to comment.