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

insert_table can't handle non 200 responses #128

Closed
couralex6 opened this issue May 17, 2024 · 1 comment
Closed

insert_table can't handle non 200 responses #128

couralex6 opened this issue May 17, 2024 · 1 comment

Comments

@couralex6
Copy link
Contributor

The InsertTableResult object only has one field (rows_written) which is only found in the 200 response:

{
  "rows_written": 9000,
  "bytes_written": 90
}

Codes 400, 401, 404, and 500 each have the following response schema:

{
  "error": "some error message"
}

When an insert error occurs, the client crashes and throws the error: KeyError: 'rows_written' without actually revealing the error returned by the API. This is making it hard to debug and to handle errors.

@bh2smith
Copy link
Collaborator

Closed by #129 - let me know if you need a new release immediately, or if it can just linger till the next improvement.

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

No branches or pull requests

2 participants