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
When trying to introspect an endpoint that I (rightfully so) am not allowed to introspect, I receive a could not parse JSON error even though the response was actually a 405 Not Allowed.
This happens because we are trying to parse a response body that is not a json. Since it's unlikely that an unsuccessful request will ever have a body that is json, we should account for different types of responses. We should also account for the fact that we might have an unsuccessful request.
Steps to reproduce
rover graph introspect https://codesandbox.io/s/ecstatic-wu-orekg --log=debug will get you the same response.
Expected result
We should return a 405 Not Allowed error.
Actual result
DEBUGrover_client::blocking::client: <html><head><title>405 Not Allowed</title></head><body><center><h1>405 Not Allowed</h1></center><hr><center>nginx/1.16.1</center></body></html> at crates/rover-client/src/blocking/client.rs:53 DEBUGrover: error: RoverError { error: could not parse JSONCaused by: expected value at line 1 column 1, metadata: Metadata { suggestion: Some(SubmitIssue), code: None, is_parse_error: false } } at src/bin/rover.rs:18error: could not parse JSON This error was unexpected! Please submit an issue with any relevant details about what you were trying to do: https://github.com/apollographql/rover/issues/new
Environment
Rover Info:
Version: 0.0.4
Install Location: /Users/lrlna/developer/apollographql/rover/target/debug/rover
OS: Mac OS 10.14.5 [64-bit]
Shell: /bin/zsh
The text was updated successfully, but these errors were encountered:
Description
When trying to introspect an endpoint that I (rightfully so) am not allowed to introspect, I receive a
could not parse JSON
error even though the response was actually a 405 Not Allowed.This happens because we are trying to parse a response body that is not a json. Since it's unlikely that an unsuccessful request will ever have a body that is json, we should account for different types of responses. We should also account for the fact that we might have an unsuccessful request.
Steps to reproduce
rover graph introspect https://codesandbox.io/s/ecstatic-wu-orekg --log=debug
will get you the same response.Expected result
We should return a 405 Not Allowed error.
Actual result
Environment
Rover Info:
Version: 0.0.4
Install Location: /Users/lrlna/developer/apollographql/rover/target/debug/rover
OS: Mac OS 10.14.5 [64-bit]
Shell: /bin/zsh
The text was updated successfully, but these errors were encountered: