Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't send the request to the client on HTTP throw #2738

Merged
merged 2 commits into from Aug 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion server/src-lib/Hasura/GraphQL/Execute.hs
Expand Up @@ -385,7 +385,9 @@ execRemoteGQ reqId userInfo reqHdrs q rsi opDef = do
where
RemoteSchemaInfo url hdrConf fwdClientHdrs = rsi
httpThrow :: (MonadError QErr m) => HTTP.HttpException -> m a
httpThrow err = throw500 $ T.pack . show $ err
httpThrow = \case
HTTP.HttpExceptionRequest _req content -> throw500 $ T.pack . show $ content
HTTP.InvalidUrlException _url reason -> throw500 $ T.pack . show $ reason

userInfoToHdrs = map (\(k, v) -> (CI.mk $ CS.cs k, CS.cs v)) $
userInfoToList userInfo
Expand Down