parsec-cloud icon indicating copy to clipboard operation
parsec-cloud copied to clipboard

Convert `&str` error to proper enum value.

Open FirelightFlagboy opened this issue 3 years ago • 0 comments

Currently in the rust code we could find Result that return &str.

We don't want that because:

  • It makes comparing errors harder.
  • Rewording the error is hard, you have to find & change the message in the code at multiple location.

Instead, what we want is an enum of the possible errors for that type of problems

We must be cautious and don't put every possible errors in the same enum. e.g: Deserialization errors shouldn't be put in the same enum that the HTTP errors

FirelightFlagboy avatar Sep 15 '22 06:09 FirelightFlagboy