waves
waves copied to clipboard
Define failure cases within bobtimus that are worthwhile reporting to the frontend
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:
- Identify, which concrete errors we want to know about on the frontend.
- 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.)
- Define and use error types for this within bobtimus (i.e.
structs that implementstd::error::Error) - Define a mapping of these errors to the specified error format
- Write the error handling code for the errors on the frontend
Failure cases
- [ ] https://github.com/comit-network/waves/issues/246
some failure cases:
- lending
- if an invalid principal amount was sent to bobtimus, the frontend gets back an http 500 without any details.
LoanRequestvalidation errors should be forwarded to the frontend.
- if an invalid principal amount was sent to bobtimus, the frontend gets back an http 500 without any details.