Skip to content

fix: Add JSON body validation using jsonDecode#1593

Open
AkshatRaj00 wants to merge 3 commits intofoss42:mainfrom
AkshatRaj00:main
Open

fix: Add JSON body validation using jsonDecode#1593
AkshatRaj00 wants to merge 3 commits intofoss42:mainfrom
AkshatRaj00:main

Conversation

@AkshatRaj00
Copy link
Copy Markdown

@AkshatRaj00 AkshatRaj00 commented Mar 30, 2026

Summary

This PR adds JSON body validation in the request editor.
When a user types invalid JSON in the body field with
content type set to json, the app now handles it
gracefully instead of sending malformed data.

Changes Made

  • Added jsonDecode validation for request body
  • Invalid JSON body is caught and handled gracefully
  • Improved HomeScreenTaskButton UI:
    • Added proper padding
    • Added tooltip on hover
    • Text overflow shows ellipsis (...) for long names

Demo

Invalid JSON → Server receives "json": null
(body not parsed as JSON)

Valid JSON → Server correctly receives parsed JSON object

[Attach Screenshot 1 here — invalid JSON response]
[Attach Screenshot 2 here — valid JSON response]

Type of Change

  • Bug fix
  • UI improvement
Screenshot 2026-03-30 210112 Screenshot 2026-03-30 210144
API.Dash.2026-03-30.20-51-40.mp4

Added a Tooltip to display text on hover and improved text overflow handling.
…ow handling

Increased vertical padding and added tooltip with label.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant