Skip to content

Allow the frontend to react to loan-request validation errors #246

@thomaseizinger

Description

@thomaseizinger

As outlined in #229, we want better error reporting between bobtimus and the frontend.

This issue tracks specifically the validation of the LoanRequest.

Validation can fail in variety of ways. In order to return meaningful errors, we need to first work out, what exactly we want to display on the frontend.

As a guideline, I would suggest to define only one RFC7807 error that we return here which is specific to LoanRequest validation opposed to defining one RFC7807 per validation failure cause.

As part of this problem, we can return additional fields (the RFC calls it "extension members") that for example list the individual form fields that were problematic. The frontend can then react to this error, find the relevant form field and display the error message from the backend to the user.

Having only on problem type instead of multiple should simplify the implementation on the frontend.


Originally posted by @bonomat in #229 (comment):

some failure cases:

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions