Skip to content

[Docs] Fix incorrect Pub/Sub example resulting in BadRequestException - #460

Merged
dwsupplee merged 1 commit into
googleapis:masterfrom
adriankirchner:master
Apr 24, 2017
Merged

[Docs] Fix incorrect Pub/Sub example resulting in BadRequestException#460
dwsupplee merged 1 commit into
googleapis:masterfrom
adriankirchner:master

Conversation

@adriankirchner

Copy link
Copy Markdown
Contributor

Fix incorrect Pub/Sub example resulting in BadRequestException:

Fatal error: Uncaught Google\Cloud\Core\Exception\BadRequestException: {
  "error": {
    "code": 400,
    "message": "Invalid value at 'messages[0].attributes[0].value' (TYPE_STRING), 1",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "messages[0].attributes[0].value",
            "description": "Invalid value at 'messages[0].attributes[0].value' (TYPE_STRING), 1"
          }
        ]
      }
    ]
  }
}

As documented [1] attributes must look like this map (key: string, value: string)

[1] https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 23, 2017

@dwsupplee dwsupplee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @adriankirchner!

@dwsupplee
dwsupplee merged commit f74454c into googleapis:master Apr 24, 2017
tmatsuo pushed a commit that referenced this pull request Apr 24, 2017
@dwsupplee dwsupplee mentioned this pull request Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants