package http
- Alphabetic
- By Inheritance
- http
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
HttpError extends RuntimeException with Error
An error type which represents an HTTP related problem.
An error type which represents an HTTP related problem.
This is an implementation of RFC 7807. In order to encourage the generation of more useful error values, this type has stricter requirements on the fields than is required by the RFC. For an implementation which maps exactly to the requirements of RFC 7807 see HttpProblem. Usage of HttpProblem is discouraged when generating errors. It should only be used when you need to parse an error, and even then only as a fallback.
-
trait
HttpProblem extends RuntimeException with Error
An error type which represents an HTTP related problem.
An error type which represents an HTTP related problem.
This is an implementation of RFC 7807. While not strictly required by the RFC, instances of this type SHOULD provide a
type,title, andstatus.- Note
This incarnation of RFC 7807 exists to be fully compliant with the RFC spec. The RFC permits all the fields to be optional, which can lead to error values which are not very useful. There is good reason for this choice by the authors of the RFC, if you are attempting to parse an error value you don't really want to fail during parsing just because the error is ill defined, you'd like to at least get what you can from the error value. That being said, using HttpError is much preferable to this type. Users are encouraged to use HttpError instead of HttpProblem.
- See also
-
type
HttpStatus = Refined[Int, Closed[Int(100), Int(599)]]
Refined representation of valid HTTP statuses.
Value Members
- object HttpError extends Serializable
- object HttpProblem extends Serializable
- object HttpStatus extends RefinedTypeOps[HttpStatus, Int]