mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5234] [feature]:Handle non-string values in 'pw.env.set', add error logs for pre/post-request scripts #1996
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1996
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kzkvv on GitHub (Jul 9, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5234
Is there an existing issue for this?
Summary
Hello! Just moved from postman to hoppscotch and found a strange behaviour: unknown error when I try to take a variable from json response and save it to env variable. Example:
Response:
{ "id": 4065 }And the reason is 'id' in response is a number. After I wrapped it with "String(res.id)" this error was resolved.
After that i have 2 suggestions:
pw.env.setmethod with "String" and accept any kind of variables (boolean/number/...). Because I found the solution only after I manually put a number as the 2nd arg. Or if it's expected behaviour can I contribute and add this solution to the official docs?Why should this be worked on?