Skip to content

Commit

Permalink
Merge pull request #242 from gofiber/remove-errors-method
Browse files Browse the repository at this point in the history
remove errors method #1768
  • Loading branch information
ReneWerner87 authored Feb 14, 2022
2 parents 20a3fe8 + 0c02616 commit 9f12bdf
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions api/fiber.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NewError creates a new HTTPError instance with an optional message.

{% code title="Signature" %}
```go
func NewError(code int, message ...interface{}) *Error
func NewError(code int, message ...string) *Error
```
{% endcode %}

Expand All @@ -96,23 +96,6 @@ app.Get("/", func(c *fiber.Ctx) error {
})
```
{% endcode %}
## NewErrors

NewErrors creates HTTPError instances with multiple error messages.

{% code title="Signature" %}
```go
func NewErrors(code int, messages ...interface{}) *Error
```
{% endcode %}

{% code title="Example" %}
```go
app.Get("/", func(c *fiber.Ctx) error {
return fiber.NewErrors(fiber.StatusServiceUnavailable, "error1", "error2")
})
```
{% endcode %}

## IsChild

Expand Down

0 comments on commit 9f12bdf

Please sign in to comment.