http-rfc7807: RFC7807 style response messages

[ bsd3, library, servant, web ] [ Propose Tags ]

RFC7807 — Problem Details for HTTP APIs style response messages.

See GitHub README for more information.

[Skip to Readme]
Versions [faq],
Change log
Dependencies aeson (>= && <2), base (>=4.12 && <5), http-media (>= && <1), http-types (>=0.12.2 && <1), servant (>=0.16 && <1), servant-server (>=0.16 && <1), text (>= && <2) [details]
License BSD-3-Clause
Copyright (c) 2020 Peter Trško
Author Peter Trško
Category Web, Servant
Home page
Bug tracker
Source repo head: git clone
Uploaded by PeterTrsko at 2020-11-02T13:48:57Z
Distributions NixOS:
Downloads 92 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-11-02 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for http-rfc7807-

[back to package description]

Problem Details for HTTP APIs (RFC7807)

Extensible implementation of RFC7807 — Problem Details for HTTP APIs in Haskell.

RFC7807 defines HTTP API error responses that are quite informative. Very basic example of such message could look like:

HTTP/1.1 404 Not Found
Transfer-Encoding: chunked
Date: Sun, 01 Nov 2020 22:28:42 GMT
Server: Warp/3.3.13
Content-Type: application/problem+json;charset=utf-8
Content-Length: 251

  "type": "",
  "title": "File resource doesn't exist",
  "status": 404,
  "detail": "Cannot upload file content to a non-existent file.",
  "documentId": "ae095978-2f7c-47aa-84dd-220be55195a5"

This library provides a data type Rfc7807Error that represents such error responses. It is designed to be extensible and to allow alternative representation of user defined fields.