go-github icon indicating copy to clipboard operation
go-github copied to clipboard

unexpected status code: 410 Gone

Open mohammedazfar-sanuk opened this issue 1 year ago • 3 comments

im getting "unexpected status code: 410 Gone" in recent days, any clue about this pl ?

mohammedazfar-sanuk avatar Jul 26 '22 17:07 mohammedazfar-sanuk

More information, please? What endpoint are you calling, for example? Have you checked the official GitHub v3 API documentation: https://docs.github.com/en/rest ?

gmlewis avatar Jul 26 '22 17:07 gmlewis

Thanks @gmlewis , im getting 410 while calling client.Actions.ListWorkflowRunsByFileName functions.

mohammedazfar-sanuk avatar Jul 27 '22 05:07 mohammedazfar-sanuk

Thanks @gmlewis , im getting 410 while calling client.Actions.ListWorkflowRunsByFileName functions.

According to https://pkg.go.dev/net/http, status code 410 is "StatusGone". Maybe there aren't any workflows with the file name you are providing?

I'm guessing that the name is case sensitive and if it contains spaces or other special characters, they may need to be escaped with: url.QueryEscape: https://pkg.go.dev/net/url#QueryEscape

gmlewis avatar Jul 27 '22 10:07 gmlewis