Proxyman
Proxyman copied to clipboard
[Scripting] Better error message when missing the `return` in `onRequest()` and `onResponse()`
Description
If we execute this script:
func onRequest(context, url, request) {
// No return here
}
We will get this unclear error:
❌Error: TypeError: undefined is not an object (evaluating 'newResponse.headers')
We should fix it.
Acceptance Criteria
- Check this scenario and present the friendly error message 👍
Done: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.0_Friendly_error_message_when_missing_the_return_func.dmg