error.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package fiber
  2. import (
  3. errors "encoding/json"
  4. "github.com/gofiber/fiber/v2/internal/schema"
  5. )
  6. type (
  7. // ConversionError Conversion error exposes the internal schema.ConversionError for public use.
  8. ConversionError = schema.ConversionError
  9. // UnknownKeyError error exposes the internal schema.UnknownKeyError for public use.
  10. UnknownKeyError = schema.UnknownKeyError
  11. // EmptyFieldError error exposes the internal schema.EmptyFieldError for public use.
  12. EmptyFieldError = schema.EmptyFieldError
  13. // MultiError error exposes the internal schema.MultiError for public use.
  14. MultiError = schema.MultiError
  15. )
  16. type (
  17. // An InvalidUnmarshalError describes an invalid argument passed to Unmarshal.
  18. // (The argument to Unmarshal must be a non-nil pointer.)
  19. InvalidUnmarshalError = errors.InvalidUnmarshalError
  20. // A MarshalerError represents an error from calling a MarshalJSON or MarshalText method.
  21. MarshalerError = errors.MarshalerError
  22. // A SyntaxError is a description of a JSON syntax error.
  23. SyntaxError = errors.SyntaxError
  24. // An UnmarshalTypeError describes a JSON value that was
  25. // not appropriate for a value of a specific Go type.
  26. UnmarshalTypeError = errors.UnmarshalTypeError
  27. // An UnsupportedTypeError is returned by Marshal when attempting
  28. // to encode an unsupported value type.
  29. UnsupportedTypeError = errors.UnsupportedTypeError
  30. UnsupportedValueError = errors.UnsupportedValueError
  31. )