You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nats req foo input exits successfully always, even if it says No responders are available.
nats req --fail-no-responder
nats req --fail-if-header HDR
Use case
If not failing by default because "we talked to NATS fine" then we should have a flag for req of "exit failure from CLI tool if request did not have a responder". This will let us script based on "there was nothing there.
Second, if we're talking to a service then the service might respond indicating a failure, and use a NATS Header to report the header. One I'm looking at now uses Nats-Service-Error: some message and Nats-Service-Error-Code: 404 and then a JSON object to indicate the error in the payload. It would be really helpful if we could use a flag to cause nats req to exit indicating a failure if that this happened.
Ideally distinct error exit codes would be used for each of those two scenarios.
Contribution
I can do.
The text was updated successfully, but these errors were encountered:
Proposed change
nats req foo input
exits successfully always, even if it saysNo responders are available
.nats req --fail-no-responder
nats req --fail-if-header HDR
Use case
If not failing by default because "we talked to NATS fine" then we should have a flag for
req
of "exit failure from CLI tool if request did not have a responder". This will let us script based on "there was nothing there.Second, if we're talking to a service then the service might respond indicating a failure, and use a NATS Header to report the header. One I'm looking at now uses
Nats-Service-Error: some message
andNats-Service-Error-Code: 404
and then a JSON object to indicate the error in the payload. It would be really helpful if we could use a flag to cause nats req to exit indicating a failure if that this happened.Ideally distinct error exit codes would be used for each of those two scenarios.
Contribution
I can do.
The text was updated successfully, but these errors were encountered: