[BUG]: client.last_response is nil when workflow_dispatch is called on a non-existent workflow #1571
Labels
hacktoberfest
Issues for participation in Hacktoberfest
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
What happened?
When you call
workflow_dispatch
with the workflow-id of a non-existent workflow like so ...You'd expect
Octokit::NotFound
to be raised but insteadclient.last_response
is set tonil
. I recorded the HTTP interaction using VCR and it does return a404 Not Found
, it seems the client is the one that's not parsing the response correctly? 😕Obviously I can check for
nil
and handle it but it does seem to be an awkward design. If it was a204 No Content
maybenil
would make sense? 🤔 Something along the lines of ... it's because this method returns a boolean response and so anil
return is a way of saying there's an error. If return:true
- it worked, dispatched!nil
- something went wrong?The odd thing is that when
true
, you do get a response inclient.last_response
. I don't know how to get it to have afalse
return for me to test what I would get there. Anyway, bug maybe? 🤷🏽♂️Versions
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: