As a result of how IPC works, if main throws an error in response to some ipcRenderer.invoke() call, the Error arrives in Renderer without custom properties and is technically an entirely different Error object. See notes in Electron docs.
As a result of this, the Tachyon failure reasons (among other things) in the Renderer require parsing of the Error string, making validation more fragile and open to mistakes. For example, this line is used to check the error message to see if it includes a specific Tachyon failure reason, which is not ideal.
Work in #547 presented an approach where requests/responses would be structured differently and ensure that the complete error information arrives at the Renderer. Something to this effect would benefit not only error handling, but also permit better, translation-friendly error notifications in the client.
As a result of how IPC works, if
mainthrows an error in response to someipcRenderer.invoke()call, the Error arrives in Renderer without custom properties and is technically an entirely different Error object. See notes in Electron docs.As a result of this, the Tachyon failure reasons (among other things) in the Renderer require parsing of the Error string, making validation more fragile and open to mistakes. For example, this line is used to check the error message to see if it includes a specific Tachyon failure reason, which is not ideal.
Work in #547 presented an approach where requests/responses would be structured differently and ensure that the complete error information arrives at the Renderer. Something to this effect would benefit not only error handling, but also permit better, translation-friendly error notifications in the client.