[PR #4759] [MERGED] fix: request validation issue on load persistence tab #4924

Closed
opened 2026-03-17 02:24:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4759
Author: @anwarulislam
Created: 2/17/2025
Status: Merged
Merged: 2/20/2025
Merged by: @jamesgeorge007

Base: nextHead: fix/multi-part-form-data-file-issue


📝 Commits (2)

  • a57da6d fix: request validation issue on load persistence tab
  • a8226b1 fix: restore value field state during page reloads

📊 Changes

2 files changed (+16 additions, -2 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/http/BodyParameters.vue (+2 -1)
📝 packages/hoppscotch-data/src/rest/v/9.ts (+14 -1)

📄 Description

Closes HFE-761 #2453 #4591

The validation schema has been updated to include error handling for the Blob array. The previous implementation:

value: z.array(z.instanceof(Blob).nullable())

has been replaced with:

value: z.array(z.instanceof(Blob).nullable()).catch([])

This change ensures that if the validation fails, the result will default to an empty array instead of throwing an error.

  • Not Completed
  • Completed

Notes to reviewers

I would like to highlight that I don't believe a new versioning is necessary for this change, as we have only added a .catch([]) to handle validation errors. This modification is minor and does not significantly alter the functionality of the schema.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4759 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 2/17/2025 **Status:** ✅ Merged **Merged:** 2/20/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `fix/multi-part-form-data-file-issue` --- ### 📝 Commits (2) - [`a57da6d`](https://github.com/hoppscotch/hoppscotch/commit/a57da6dbcf61f9c7d3e25519bbb9b98cd2a2ec28) fix: request validation issue on load persistence tab - [`a8226b1`](https://github.com/hoppscotch/hoppscotch/commit/a8226b137c3f72d02f9b66d6b473e3c2d24934ae) fix: restore value field state during page reloads ### 📊 Changes **2 files changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/http/BodyParameters.vue` (+2 -1) 📝 `packages/hoppscotch-data/src/rest/v/9.ts` (+14 -1) </details> ### 📄 Description Closes HFE-761 #2453 #4591 The validation schema has been updated to include error handling for the `Blob` array. The previous implementation: ```javascript value: z.array(z.instanceof(Blob).nullable()) ``` has been replaced with: ```javascript value: z.array(z.instanceof(Blob).nullable()).catch([]) ``` This change ensures that if the validation fails, the result will default to an empty array instead of throwing an error. - [ ] Not Completed - [x] Completed ### Notes to reviewers I would like to highlight that I don't believe a new versioning is necessary for this change, as we have only added a `.catch([])` to handle validation errors. This modification is minor and does not significantly alter the functionality of the schema. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:24:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4924
No description provided.