-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestepicLarge scale enhancementLarge scale enhancement
Description
Avoid using expect when handling Results since it panics if the result type is an Err. To me it seems that it could easily happen in production that the database fails to insert something and using expect would crash the entire code. Therefore, I would change database handling functions such that they return a Result<Something, response::Error>, so we would be able to handle errors dynamically, e.g. retry calling insert.
Furthermore, try to get rid of unwraps (in tests you can keep them), unless you can guarantee that it will never panic. Maybe add a short comment at every unwrap explaining why is it okay to use it there.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestepicLarge scale enhancementLarge scale enhancement