blob: d1707de577fbb0008ac87e3fe53456716a77199e (
plain)
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
|
# Error Handling: External Errors
## Tags
* assigned: fredm
* status: open
* type: bug
* priority: high
* keywords: error handling
## Description
We have been consistently moving a lot of our features out of GN2 to external API services like GN3 and GN-Auth. This means that when we have errors in the external service(s), then GN2 does not have direct access to the error(s) to handle it.
So far, the error-handling for such services has been inconsistent at best. In this issue, we propose that such errors be handled by simply raising an exception with the passed in error information, to wit:
> The better approach may be to simply raise this as an exception so that some
> exception handler somewhere down the line can handle it.
> Here's the larger philosophy. The exception system of a programming language
> is meant to handle errors, and is well-suited to this purpose. But, we use
> different backends connected over an API and break the exception system. Our
> goal must be to bridge the API gap so that exceptions can cross over. Thus,
> we enable the exception system to do the job it was always meant to do.
> - Arun Isaac
> => https://github.com/genenetwork/genenetwork2/pull/830
We can then maybe incorporate the use of UUIDs in the errors, to help with tracking the errors in the logs where necessary.
----
Some work has been done on this, but it is still a work in progress.
**Maybe link the commits here…**
|