• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agama-project / agama / 22140667759

18 Feb 2026 12:57PM UTC coverage: 74.989% (-0.009%) from 74.998%
22140667759

push

github

web-flow
web: Log the data sent to the backend when the request fails (#3076)

## Problem

- When debugging web frontend problems it might be useful to log the
data sent to the backend
- Related to https://bugzilla.suse.com/show_bug.cgi?id=1256069

## Solution

- When the `fetch()` calls fail handle the error and log details
- Because we still do not have our own top-level error handler it will
report a crash using the default React page. But at least we should be
able to collect more details from the browser console.

## Notes

- Added a new `sanitize()` function which creates a copy of the input
object with all sensitive properties like "password" or
"registrationCode" replaced with text "[FILTERED]".
- This avoids logging sensitive data

## Testing

- Added unit test
- Tested with manually changed URL to invalid `/api/v2/configs` to
trigger a server error, the console then contains this:
<img width="667" height="163" alt="agama-console-log-details"
src="https://github.com/user-attachments/assets/c61533f8-5957-4e82-b4aa-ac37ec8c93d5"
/>
  The text in saved console content contains this:
  ```
12:57:31.707 installHook.js:1 Request /api/v2/configs failed, sent data:
   {
    "update": {
      "root": {
        "sshPublicKey": "",
        "password": "[FILTERED]",
        "hashedPassword": false
      }
    }
  }
  ```

3119 of 5225 branches covered (59.69%)

Branch coverage included in aggregate %.

21 of 29 new or added lines in 2 files covered. (72.41%)

7 existing lines in 1 file now uncovered.

20570 of 26365 relevant lines covered (78.02%)

72.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/web/src/http.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc