Error handling refactor
This refactor aims to improve error handling throughout the project by refining the overarching error types and increasing usage of proper error handling. Replaced existing networked operation error with `NetworkOperationError`. `NetworkOperationError` does not forward any internal error details, which allows `OperationError` to grow into a better error type. `OperationError` now has support for storing real typed errors inside of it for better debugging. `IntoInternalError` is a trait which allows for easy conversion of error types into `OperationError::internal`.
parent: tbd commit: e02c03d
1 | use Debug; |
2 | |
3 | use crate ConnectionState; |
4 | use OperationError; |
5 | |
6 | use GiteratedObject; |
7 | |
8 | use |
9 | Repository, RepositoryFileInspectRequest, RepositoryIssueLabelsRequest, |
10 | RepositoryIssuesCountRequest, RepositoryIssuesRequest, |
11 | ; |
12 | |
13 | use User; |
14 | |
15 | use GetValueTyped; |
16 | use ; |
17 | |
18 | |
19 | |
20 | ; |
21 | |
22 | |
23 | |
24 | /// Authorizes the operation, returning whether the operation was |
25 | /// authorized or not. |
26 | async |
27 | &self, |
28 | authenticating_user: , |
29 | object: &O, |
30 | state: &mut S, |
31 | ; |
32 | |
33 | |
34 | |
35 | |
36 | async |
37 | &self, |
38 | _authenticating_user: , |
39 | _object: &User, |
40 | _state: &mut ConnectionState, |
41 | |
42 | // TODO |
43 | Ok |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | async |
50 | &self, |
51 | _authenticating_user: , |
52 | _object: &Repository, |
53 | _state: &mut ConnectionState, |
54 | |
55 | // TODO |
56 | Ok |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | AuthorizedOperation for GetValueTyped |
63 | |
64 | async |
65 | &self, |
66 | _authenticating_user: , |
67 | _object: &Repository, |
68 | _state: &mut ConnectionState, |
69 | |
70 | // TODO |
71 | Ok |
72 | |
73 | |
74 | |
75 | |
76 | |
77 | async |
78 | &self, |
79 | _authenticating_user: , |
80 | _object: &Repository, |
81 | _state: &mut ConnectionState, |
82 | |
83 | // TODO |
84 | Ok |
85 | |
86 | |
87 | |
88 | |
89 | |
90 | async |
91 | &self, |
92 | _authenticating_user: , |
93 | _object: &Repository, |
94 | _state: &mut ConnectionState, |
95 | |
96 | // TODO |
97 | Ok |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | async |
104 | &self, |
105 | _authenticating_user: , |
106 | _object: &Repository, |
107 | _state: &mut ConnectionState, |
108 | |
109 | // TODO |
110 | Ok |
111 | |
112 | |
113 | |
114 | |
115 | |
116 | async |
117 | &self, |
118 | _authenticating_user: , |
119 | _object: &Repository, |
120 | _state: &mut ConnectionState, |
121 | |
122 | // TODO |
123 | Ok |
124 | |
125 | |
126 | |
127 | |
128 | |
129 | async |
130 | &self, |
131 | _authenticating_user: , |
132 | _object: &Repository, |
133 | _state: &mut ConnectionState, |
134 | |
135 | // TODO |
136 | Ok |
137 | |
138 | |
139 |