Closed couralex6 closed 6 months ago
I like the solution although it doesn't quite follow the pattern we're using everywhere else. If you check the api/execution.py file you'll see this common pattern of try catch key error and then raise of dune error. Realistically we should improve the error classifications, but it might be good to try to follow the similar pattern for now so we can find all the things that need changing after improvements have been made.
I would also prefer to raise here instead of returning something that needs to be matched on. At least until the whole library is working that way.
@bh2smith throwing a DuneError
when insert failed. I'm using DuneError, but we could also create a new Error type for the tables endpoint. lmk what you think
Looks good for now! I think improving error handling as a whole could be reserved for a follow up PR. let's get this in for now and address that separately. Let me know if you're happy with this and we can get it released.
Fix for issue #128
Attempting to resolve the issue of unhandled insert errors with a new dataclass
InsertTableErrorResult
which can handle theerror
field.This is most likely not the most elegant way to handle this. I'm open to suggestions :)