-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Unable to catch (release API) errors without reconnection #166
Comments
Would you mind sharing a code snippet of how you're doing it currently? |
sure its v WIP, but the connect to github is here: the session is created here: and anything around here, can trigger an error if there is an existing tag/artefact etc: i can look before i leap, which i probs would anyway, but it would be good to catch gidgethub errors as known and handlable anyway, without having to reconnect |
Thanks for sharing. I saw these snippets:
I think it was not necessary to close the |
it was because without doing so i hit this error
when trying to make further accesses to the api |
experimenting with this further, it seems the issue i hit is only happening with release artefact uploads i can catch and carry on in these situations:
the problem seems to be limited to the post/data/upload trying to send artefacts that exist already - which also raises a in that situation, catching and reusing the client connection results in |
and experimenting a bit further... i stepped through the code - afaict the aiohttp response is all good (well failing but with correct info etc) if i add not sure if this is something to do with github's api or an aiohttp issue with failed |
i think the latter as if i reconnect immediately it works |
It sounds more like a bug with aiohttp, and not with gidgethub. |
im using gidgethub to push releases/artefacts.
if an artefact exists already it throws a
gidgethub.InvalidField: Validation Failed for 'name'
if i catch the error, i have to reconnect (ie delete/create new) the session/GitHubAPI objects
im wondering if there is either a way to catch errors without the connection hosing, or a good/canonical way to reconnect if it does
The text was updated successfully, but these errors were encountered: