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

Better NoValidCandidatesError messages. #536

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Better NoValidCandidatesError messages. #536

merged 2 commits into from
Jul 8, 2024

Conversation

mbleigh
Copy link
Collaborator

@mbleigh mbleigh commented Jul 3, 2024

Before

Error: FAILED_PRECONDITION: Generation resulted in not a single candidate matching provided output schema.

After

Error: FAILED_PRECONDITION: Generation resulted in not a single candidate matching provided output schema.

Candidate[0] Error: INVALID_ARGUMENT: Schema validation failed. Parse Errors:

- (root): must have required property 'name'

Provided data:

{
  "displayName": "Some Name"
}

Required JSON schema:

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": true,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

@mbleigh mbleigh merged commit 610e3ed into main Jul 8, 2024
4 checks passed
@mbleigh mbleigh deleted the better-errors branch July 8, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants