Skip to content
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

feat: add error code unauthorized #313

Merged
merged 2 commits into from
Sep 5, 2023
Merged

feat: add error code unauthorized #313

merged 2 commits into from
Sep 5, 2023

Conversation

apricote
Copy link
Member

@apricote apricote commented Sep 5, 2023

This makes it possible to check for an invalid token using hcloud.IsError(err, hcloud.ErrorCodeUnauthorized).

This makes it possible to check for an invalid token using
`hcloud.IsError(err, hcloud.ErrorCodeUnauthorized)`.
@apricote apricote requested a review from a team as a code owner September 5, 2023 12:23
@apricote apricote self-assigned this Sep 5, 2023
The "header" comment previously showed up for the first error code of
that category. By adding an empty line inbetween the two are no longer
connected.

By using "Deprecated: " tooling will automatically show a deprecation
warning for the `ErrorCodeLimitReached` constant.
@apricote apricote added backport release-1.x Open PR against release-1.x with these changes after the PR is merged. Feature labels Sep 5, 2023
@apricote apricote merged commit b77d9e0 into main Sep 5, 2023
5 checks passed
@apricote apricote deleted the error-code-unauthorized branch September 5, 2023 12:38
github-actions bot pushed a commit that referenced this pull request Sep 5, 2023
* feat: add error code unauthorized

This makes it possible to check for an invalid token using
`hcloud.IsError(err, hcloud.ErrorCodeUnauthorized)`.

* docs: cleanup error codes comments

The "header" comment previously showed up for the first error code of
that category. By adding an empty line inbetween the two are no longer
connected.

By using "Deprecated: " tooling will automatically show a deprecation
warning for the `ErrorCodeLimitReached` constant.

(cherry picked from commit b77d9e0)
apricote added a commit that referenced this pull request Sep 5, 2023
* feat: add error code unauthorized

This makes it possible to check for an invalid token using
`hcloud.IsError(err, hcloud.ErrorCodeUnauthorized)`.

* docs: cleanup error codes comments

The "header" comment previously showed up for the first error code of
that category. By adding an empty line inbetween the two are no longer
connected.

By using "Deprecated: " tooling will automatically show a deprecation
warning for the `ErrorCodeLimitReached` constant.

(cherry picked from commit b77d9e0)

Co-authored-by: Julian Tölle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.x Open PR against release-1.x with these changes after the PR is merged. Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants