waves icon indicating copy to clipboard operation
waves copied to clipboard

Define failure cases within bobtimus that are worthwhile reporting to the frontend

Open thomaseizinger opened this issue 4 years ago • 1 comments

This is a follow-up issue based on the findings here: https://github.com/comit-network/waves/issues/196#issuecomment-892389709

The infrastructure of good error reporting is in place, i.e. we have a well-defined error interface through RFC7807.

To make use of this, we need to:

  1. Identify, which concrete errors we want to know about on the frontend.
  2. Design the error response we would like to see for these errors. In other words, think about the RFC7807 response first. (Bonus points for adding tests for it.)
  3. Define and use error types for this within bobtimus (i.e. structs that implement std::error::Error)
  4. Define a mapping of these errors to the specified error format
  5. Write the error handling code for the errors on the frontend

Failure cases

  • [ ] https://github.com/comit-network/waves/issues/246

thomaseizinger avatar Aug 07 '21 01:08 thomaseizinger

some failure cases:

  • lending
    • if an invalid principal amount was sent to bobtimus, the frontend gets back an http 500 without any details. LoanRequest validation errors should be forwarded to the frontend.

bonomat avatar Aug 15 '21 22:08 bonomat