gofiber/fiber · error · ErrBodyType
the body type should be []byte
Error message
the body type should be []byte
What it means
Error "the body type should be []byte" thrown in gofiber/fiber.
Source
Thrown at client/core.go:296
// releaseErrChan returns the error channel to the pool.
// It's caller's responsibility to ensure that:
// - the channel is not closed
// - the channel is drained before returning it
// - the channel is not reused after returning it
func releaseErrChan(ch chan error) {
errChanPool.Put(ch)
}
// newCore returns a new core object.
func newCore() *core {
return &core{}
}
var (
ErrTimeoutOrCancel = errors.New("timeout or cancel")
ErrURLFormat = errors.New("the URL is incorrect")
ErrNotSupportSchema = errors.New("protocol not supported; only http or https are allowed")
ErrFileNoName = errors.New("the file should have a name")
ErrBodyType = errors.New("the body type should be []byte")
ErrNotSupportSaveMethod = errors.New("only file paths and io.Writer are supported")
ErrBodyTypeNotSupported = errors.New("the body type is not supported")
)
View on GitHub (pinned to 9a4c7e57fe)
When it happens
Trigger: Thrown at client/core.go:296 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gofiber/fiber@9a4c7e57fe (2026-08-04).
Data as JSON: /data/errors/227be73e696c0dc8.json.
Report an issue: GitHub.