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

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

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

adriankirchner
Copy link
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
Copy link
Contributor

@dwsupplee dwsupplee left a comment

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