Skip to content

Error codes for failed repo webhook requests are "Unknown"  #912

@jusunglee

Description

@jusunglee

Repositories.ListHooks(ctx, owner, repository, opts) returns hooks, response, and error. If response failed with codes such as 404 or 403, this is not reflected in the error code. Using errors.Code(err) when response returns an error HTTP status code will simply return codes.Unknown, when it should really be codes.PermissionDenied or codes.NotFound.

Propose a change where we map HTTP Response status codes (if error) into the error object's error code.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions