goccy / bigquery-emulator

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

Fix status code for duplicate job and datasets #257

Open thuibr opened 11 months ago

thuibr commented 11 months ago

@goccy this is to replace #184. I tried to address your comments, but I don't think I can use errResponse. I'm copying what's done for duplicate tables instead.

thuibr commented 11 months ago

For some reason, even after making ErrDuplicatedDataset, it's still being reported as an internalError, and this equality check is returning false:

https://github.com/goccy/bigquery-emulator/pull/257/files#diff-4dacc7a06791d88085bc744a0a2aa16559cb5b9b8fddd705177bfa2fbfe41d29R683