Reference
Errors
Every error class that forges throws.
All errors extend ForgeError. Errors from a request carry forge, instance, url and method. See Handle errors and rate limits.
| Class | Extends | Thrown when |
|---|---|---|
ForgeError | Error | Base class |
ForgeApiError | ForgeError | The forge responded with an error. Has status and body |
RateLimitedError | ForgeApiError | A rate limit was hit and a retry didn't help. Has resetAt and secondary |
TokenRevokedError | ForgeApiError | The credential was revoked or expired |
InsufficientScopeError | ForgeApiError | The credential is valid but lacks a scope or permission |
ForbiddenError | ForgeApiError | The forge refused for another reason. Has reason: org_restriction, sso_required, rate_limit_abuse, resource_protected or unknown |
MergeBlockedError | ForgeApiError | A pull request can't be merged yet, for example because of failing checks or branch protection |
MergeConflictError | ForgeApiError | A merge conflicts with the base branch, or the head moved since sha was read |
MergeMethodRequiredError | ForgeError | No merge method was given and the repository allows more than one |
ForgeTimeoutError | ForgeError | A request or a pending merge exceeded timeout |
ForgeNetworkError | ForgeError | A request got no response: DNS, TLS, connection refused or a proxy refusal |
WebhookVerificationError | ForgeError | A delivery's signature didn't match |
SubscriptionClosedError | ForgeError | A live connection closed or failed. Has the last cursor |
UnsupportedOperationError | ForgeError | The forge doesn't support the operation |
ReadOnlyError | UnsupportedOperationError | A write was called on a readOnly provider |
ContentNotTextError | ForgeError | A file was read as text and its bytes aren't valid UTF-8 |
UnknownForgeError | ForgeError | A ref names a forge instance that no registered provider serves |
UnresolvedThreadError | ForgeError | A thread ref has no number, or is a kind the provider can't address |