We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm currently experimenting with the gogol-datastore library, and experienced an bug. Here my example code:
{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Google as Google import Network.Google.Datastore import Control.Lens import System.IO (stdout) import Control.Monad.Trans (liftIO) main = do let papegoPartition = partitionId & piProjectId ?~ "my-project-id" & piNamespaceId ?~ "dev" logger <- Google.newLogger Google.Debug stdout env <- Google.newEnv <&> (Google.envLogger .~ logger) . Google.allow datastoreScope let proofId = key & kPartitionId ?~ papegoPartition & kPath .~ [pathElement & peKind ?~ "Proof" & peName ?~ "proof_abc"] proofEntity = entity & eKey ?~ proofId putStrLn "Entity:" print proofEntity let upsertProof = commitRequest & crMutations .~ [mutation & mUpsert ?~ proofEntity] & crMode ?~ NonTransactional print upsertProof runResourceT . runGoogle env $ do resp <- Google.send (projectsCommit upsertProof "my-project-id") liftIO $ print resp putStrLn "Done!"
Results into a 404 with this debug output:
[Client Request] { host = datastore.googleapis.com:443 secure = True method = POST timeout = Just 70000000 redirects = 10 path = /v1beta3/projects/my-project-idcommit query = ?pp=true&alt=json headers = authorization: Bearer XXX; accept: application/json; content-type: application/json body = {"mutations":[{"upsert":{"key":{"partitionId":{"namespaceId":"dev","projectId":"my-project-id"},"path":[{"kind":"Proof","name":"proof_abc"}]}}}],"mode":"NON_TRANSACTIONAL"} } [Client Response] { status = 404 Not Found headers = date: Tue, 26 Jul 2016 13:29:12 GMT; content-type: text/html; charset=UTF-8; server: ESF; content-length: 1616; x-xss-protection: 1; mode=block; x-frame-options: SAMEORIGIN; x-content-type-options: nosniff; alternate-protocol: 443:quic; alt-svc: quic=":443"; ma=2592000; v="36,35,34,33,32,31,30,29,28,27,26,25" }
The Problem is the path: /v1beta3/projects/my-project-idcommit which should be /v1beta3/projects/my-project-id:commit (see REST-API Reference)
/v1beta3/projects/my-project-idcommit
/v1beta3/projects/my-project-id:commit
Changing
resp <- Google.send (projectsCommit upsertProof "my-project-id")
to
resp <- Google.send (projectsCommit upsertProof "my-project-id:")
solves it as quick workaround.
The text was updated successfully, but these errors were encountered:
Thanks for looking into it and providing the workaround. I'll fix it in the library proper shortly.
Sorry, something went wrong.
Adding missing colon separator when CaptureModes are serialised
ce84f24
For example, CaptureMode "projectId" "commit" being incorrectly serialised to "projectIdcommit" instead of "projectId:commit". Fixes #33
brendanhay
No branches or pull requests
I'm currently experimenting with the gogol-datastore library, and experienced an bug. Here my example code:
Results into a 404 with this debug output:
The Problem is the path:
/v1beta3/projects/my-project-idcommit
which should be/v1beta3/projects/my-project-id:commit
(see REST-API Reference)Changing
to
solves it as quick workaround.
The text was updated successfully, but these errors were encountered: