openupm-cli icon indicating copy to clipboard operation
openupm-cli copied to clipboard

refactor: de-result unexpected errors

Open ComradeVanti opened this issue 3 weeks ago • 0 comments

Currently most functions in the project use Result based return types. When I started to implement this I was of the opinion that all functions should use the Result based workflow to allow for railway oriented programming.

In the course of refactoring this project to use Results I sometimes had a feeling that maybe some types of errors are not suitable to be used in Results. Recently I read this blog post which confirmed my suspicions and enhanced my understanding of error handling.

In this PR I revert my over-zealous usage of Results. They should now only be used for handle-able domain errors.

ComradeVanti avatar Jul 03 '24 08:07 ComradeVanti