Oak

View Ticket
Login

View Ticket

Ticket Hash: 43661a7df76807f0f1a1f0bc38f4325f202372a2
Title: "Unprocessable entity" when adding Schedule with non-numeric amount
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2022-08-02 12:54:36
Version Found In: v0.3.2
User Comments:
carlos added on 2022-08-01 16:11:03:

Tried to add a Schedule with random values, the amount was asd234.

When clicking Submit, a popup with HTML code came up:

Error: <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>422 Unprocessable Entity</title>
</head>
<body align="center">
    <div role="main" align="center">
        <h1>422: Unprocessable Entity</h1>
        <p>The request was well-formed but was unable to be followed due to semantic errors.</p>
        <hr />
    </div>
    <div role="contentinfo" align="center">
        <small>Rocket</small>
    </div>
</body>
</html>

Logs:

2022-08-01 16:08:34 - oak::api::payment_job_schedule WARN: Data guard `Json < NewScheduledPaymentJob >` failed: Parse("{\"destination\":\"dsfads@sdf.com\",\"amount_sats\":null,\"bcron\":\"/144\"}", Error("invalid type: null, expected i64", line: 1, column: 50)).
2022-08-01 16:08:34 - rocket::server WARN: No 422 catcher registered. Using Rocket default.

The UI should show a short concise error message (no HTML), or even better a validation message on the modal popup.


carlos added on 2022-08-02 12:54:36:

Fixed in aa185eb41bf6d768