mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
Update app.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9b91945459
commit
6abd9c9ea6
2
app.go
2
app.go
@ -883,6 +883,8 @@ func (e *Error) Error() string {
|
||||
|
||||
// NewError creates a new Error instance with an optional message.
|
||||
// Additional arguments are formatted using fmt.Sprintf when provided.
|
||||
// If the first argument in the message slice is not a string, the function
|
||||
// falls back to using fmt.Sprint on the first element to generate the message.
|
||||
func NewError(code int, message ...any) *Error {
|
||||
msg := utils.StatusMessage(code)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user