goccy / bigquery-emulator

BigQuery emulator server implemented in Go
MIT License
845 stars 108 forks source link

return 409 on dataset duplicate #256

Open thuibr opened 11 months ago

thuibr commented 11 months ago

What happened?

Hello, First of all, thank you for this creating and maintaining this project! We are looking at using it for our development and testing.

I ran into this issue, similar to #66 but with datasets. There is a PR out there, #184, which attempts to resolve the issue, but it seems to have gone stale. I'm filing an issue to raise visibility and to also possibly contribute a fix myself.

What happens is the google bigquery client keeps on trying to create the dataset but getting 500 errors. If its a 4xx error, then I think that the client will quit trying, which is what we want.

What did you expect to happen?

It should produce a 409 error, I believe.

How can we reproduce it (as minimally and precisely as possible)?

Try creating a dataset that already exists in the bigquery emulator as well as the real bigquery.

Anything else we need to know?

No response