-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapiError.mli
More file actions
48 lines (41 loc) · 1.8 KB
/
apiError.mli
File metadata and controls
48 lines (41 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(* ************************************************************************** *)
(* Project: Life - the game, Official OCaml SDK *)
(* Author: db0 (db0company@gmail.com, http://db0.fr/) *)
(* Latest Version is on GitHub: https://github.com/Life-the-game/SDK-OCaml *)
(* ************************************************************************** *)
(** Errors type, converter and client-side errors *)
(* ************************************************************************** *)
(** {3 Type} *)
(* ************************************************************************** *)
type detail =
{
dcode : int;
dtype : string;
dmessage : string;
key : string option;
value : string option;
}
type t =
{
message : string;
stype : string;
code : int;
details : detail list;
}
(* ************************************************************************** *)
(** {3 Tools} *)
(* ************************************************************************** *)
val from_json : Yojson.Basic.json -> t
(* ************************************************************************** *)
(** {3 Client-side errors} *)
(* ************************************************************************** *)
val generic : t
val network : string -> t
val invalid_json : string -> t
val requirement_missing : t
val invalid_format : t
val file_not_found : t
val invalid_argument : string -> t
val auth_required : t
val notfound : t
val redirect : string -> t