3 | import HTTP.API.Decode
4 | import HTTP.RequestErr
5 | import IO.Async.Logging
6 | import public HTTP.I18n
11 | [HTTPEN] HTTPLocal where
12 | endOfURIPath = "unexpected end of URI path"
13 | floatingPointNumber = "floating point number"
15 | invalidPath = "invalid URI path"
16 | jsonValue = "JSON value"
17 | logLevel = interpolate
18 | missingBoundary = "invalid form-data header: missing boundary"
19 | missingFormDataPart p ps = "missing form-data part: \{p} (parts: \{ps})"
20 | missingHeader h = "missing HTTP header: \{h}"
21 | missingQueryParameter n = "missing query parameter: '\{n}'"
22 | missingQueryValue n = "missing query value: '\{n}'"
23 | myMediaTypeNotAccepted x y = "i provide \{x} but requests accepts only \{y}"
24 | unsignedInteger = "unsigned integer"
25 | naturalNumber = "natural number"
27 | "Value out of bounds. It should be between \{show a} and \{show b}."
29 | prettyRequestErr (RE s e m d p) =
35 | details : \{either show id d}
39 | prettyDecodeErr (ReadErr t s d) = "invalid \{t}\{valueString s}"
40 | prettyDecodeErr (ContentErr t d) = "invalid \{t}"
41 | prettyDecodeErr (Msg msg) = msg