hurl
hurl copied to clipboard
improve error message the HTTP method <> is not valid. Valid values are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH
What is the current bug behavior?
It's not a bug per-se but an error message that I find not clear and wonder if it could be improved:
46 | [Captures]
| ^ the HTTP method <> is not valid. Valid values are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH
happens when I do
POST {{URL}}/v2/model_manager/model
content-type: application/json
accept: application/json
file,payloads/v2/toto.json;
# HTTP 201 # uncommenting this line makes the error go away
[Captures]
model: jsonpath "$"
shouldn't the error message be like "please add HTTP statement" or "valid values are 404,422,201, or any http codes" ? I suppose this error because it expects a new request.
Feel free to close this issue if it's intractable
Hi @teto, HTTP statement is mandatory when Response is present:
We'll try to improve logging and documentation to make it clearer.