RFC: Rework error handling #267
Labels
Component: Graph Manager
Issues related to graph processing and management (including interaction with engine server) logic
Studio Core Team
Opened by a member of the Studio core team
Type: Discussion
Type: Refactor
Milestone
💬 Request for Comments
The way to handle exception/errors right now is not systematic and potentially can cause bugs to be uncaught. This is bad because we can throw errors at users and cause the app to crash unintentionally.
Context and Motivation
alertIllegalUnhandledError
to assert uncaught exceptions are not crashing the app at component-leveltry-catch
around each call instead of a using acatch-all
block for important logics: Refactor critical path to use an approach similar to that offinos/legend-sdlc
for error-handling (make the code verbose but very clear to read - we havetry-catch
around each call that might pose a problem, we learn how SDLC server methods likebuildException
that will build the exception (for404
,403
, etc.) and bypass already built exception, i.e.MetadataException
(in our caseStudioError
orApplicationError
) -This might be a substantial piece of work
GraphError
outside, is this the right thing to do?SDLC_PROBLEM
,SETUP_PROBLEM
, those events are clearly not useful at all, we should make them more specific and if we follow the refactor fortry/catch
usage as detailed above, we should be able to use a proper logging event for eachtry/catch
blockhandleNetworkError()
that will handle401
,404
,403
and the likes systematically.The text was updated successfully, but these errors were encountered: