Documentation
¶
Index ¶
- type APIError
- type BadRequestErrorResponse
- type ConflictErrorResponse
- type ForbiddenErrorResponse
- type GoneErrorResponse
- type InternalServerErrorResponse
- type NotFoundErrorResponse
- type PreconditionFailedErrorResponse
- type ServiceUnavailableErrorResponse
- type TooManyRequestsErrorResponse
- type UnauthorizedErrorResponse
- type UnprocessableEntityErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
func NewAPIError ¶
type BadRequestErrorResponse ¶
type BadRequestErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Extended error details specifically for bad request (400) errors. This builds on the BaseError structure by adding an array of individual validation errors, making it easy to identify and fix multiple issues at once.
Error_ components.BadRequestErrorDetails `json:"error"`
}
BadRequestErrorResponse - Error response for invalid requests that cannot be processed due to client-side errors. This typically occurs when request parameters are missing, malformed, or fail validation rules. The response includes detailed information about the specific errors in the request, including the location of each error and suggestions for fixing it. When receiving this error, check the 'errors' array in the response for specific validation issues that need to be addressed before retrying.
func (*BadRequestErrorResponse) Error ¶
func (e *BadRequestErrorResponse) Error() string
type ConflictErrorResponse ¶
type ConflictErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
ConflictErrorResponse - Error response when the request conflicts with the current state of the resource. This occurs when: - Attempting to create a resource that already exists - Modifying a resource that has been changed by another operation - Violating unique constraints or business rules
To resolve this error, check the current state of the resource and adjust your request accordingly.
func (*ConflictErrorResponse) Error ¶
func (e *ConflictErrorResponse) Error() string
type ForbiddenErrorResponse ¶
type ForbiddenErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
ForbiddenErrorResponse - Error response when the provided credentials are valid but lack sufficient permissions for the requested operation. This occurs when: - The root key doesn't have the required permissions for this endpoint - The operation requires elevated privileges that the current key lacks - Access to the requested resource is restricted based on workspace settings
To resolve this error, ensure your root key has the necessary permissions or contact your workspace administrator.
func (*ForbiddenErrorResponse) Error ¶
func (e *ForbiddenErrorResponse) Error() string
type GoneErrorResponse ¶ added in v2.0.3
type GoneErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
GoneErrorResponse - Error response when the requested resource has been soft-deleted and is no longer available. This occurs when: - The resource has been marked as deleted but still exists in the database - The resource is intentionally unavailable but could potentially be restored - The resource cannot be restored through the API or dashboard
To resolve this error, contact support if you need the resource restored.
func (*GoneErrorResponse) Error ¶ added in v2.0.3
func (e *GoneErrorResponse) Error() string
type InternalServerErrorResponse ¶
type InternalServerErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
InternalServerErrorResponse - Error response when an unexpected error occurs on the server. This indicates a problem with Unkey's systems rather than your request.
When you encounter this error: - The request ID in the response can help Unkey support investigate the issue - The error is likely temporary and retrying may succeed - If the error persists, contact Unkey support with the request ID
func (*InternalServerErrorResponse) Error ¶
func (e *InternalServerErrorResponse) Error() string
type NotFoundErrorResponse ¶
type NotFoundErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
NotFoundErrorResponse - Error response when the requested resource cannot be found. This occurs when: - The specified resource ID doesn't exist in your workspace - The resource has been deleted or moved - The resource exists but is not accessible with current permissions
To resolve this error, verify the resource ID is correct and that you have access to it.
func (*NotFoundErrorResponse) Error ¶
func (e *NotFoundErrorResponse) Error() string
type PreconditionFailedErrorResponse ¶
type PreconditionFailedErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
PreconditionFailedErrorResponse - Error response when one or more conditions specified in the request headers are not met. This typically occurs when: - Using conditional requests with If-Match or If-None-Match headers - The resource version doesn't match the expected value - Optimistic concurrency control detects a conflict
To resolve this error, fetch the latest version of the resource and retry with updated conditions.
func (*PreconditionFailedErrorResponse) Error ¶
func (e *PreconditionFailedErrorResponse) Error() string
type ServiceUnavailableErrorResponse ¶ added in v2.2.0
type ServiceUnavailableErrorResponse struct {
Meta components.Meta `json:"meta"`
Error_ components.BaseError `json:"error"`
}
ServiceUnavailableErrorResponse - Error response when a required service is temporarily unavailable. This indicates that the service exists but cannot be reached or is not responding.
When you encounter this error: - The service is likely experiencing temporary issues - Retrying the request after a short delay may succeed - If the error persists, the service may be undergoing maintenance - Contact Unkey support if the issue continues
func (*ServiceUnavailableErrorResponse) Error ¶ added in v2.2.0
func (e *ServiceUnavailableErrorResponse) Error() string
type TooManyRequestsErrorResponse ¶ added in v2.2.0
type TooManyRequestsErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
TooManyRequestsErrorResponse - Error response when the client has sent too many requests in a given time period. This occurs when you've exceeded a rate limit or quota for the resource you're accessing.
The rate limit resets automatically after the time window expires. To avoid this error: - Implement exponential backoff when retrying requests - Cache results where appropriate to reduce request frequency - Check the error detail message for specific quota information - Contact support if you need a higher quota for your use case
func (*TooManyRequestsErrorResponse) Error ¶ added in v2.2.0
func (e *TooManyRequestsErrorResponse) Error() string
type UnauthorizedErrorResponse ¶
type UnauthorizedErrorResponse struct {
Meta components.Meta `json:"meta"`
Error_ components.BaseError `json:"error"`
}
UnauthorizedErrorResponse - Error response when authentication has failed or credentials are missing. This occurs when: - No authentication token is provided in the request - The provided token is invalid, expired, or malformed - The token format doesn't match expected patterns
To resolve this error, ensure you're including a valid root key in the Authorization header.
func (*UnauthorizedErrorResponse) Error ¶
func (e *UnauthorizedErrorResponse) Error() string
type UnprocessableEntityErrorResponse ¶ added in v2.2.0
type UnprocessableEntityErrorResponse struct {
// Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
Meta components.Meta `json:"meta"`
// Base error structure following Problem Details for HTTP APIs (RFC 7807). This provides a standardized way to carry machine-readable details of errors in HTTP response content.
Error_ components.BaseError `json:"error"`
}
UnprocessableEntityErrorResponse - Error response when the request is syntactically valid but cannot be processed due to semantic constraints or resource limitations. This occurs when: - A query exceeds execution time limits - A query uses more memory than allowed - A query scans too many rows - A query result exceeds size limits
The request syntax is correct, but the operation cannot be completed due to business rules or resource constraints. Review the error details for specific limitations and adjust your request accordingly.
func (*UnprocessableEntityErrorResponse) Error ¶ added in v2.2.0
func (e *UnprocessableEntityErrorResponse) Error() string
Source Files
¶
- apierror.go
- badrequesterrorresponse.go
- conflicterrorresponse.go
- forbiddenerrorresponse.go
- goneerrorresponse.go
- internalservererrorresponse.go
- notfounderrorresponse.go
- preconditionfailederrorresponse.go
- serviceunavailableerrorresponse.go
- toomanyrequestserrorresponse.go
- unauthorizederrorresponse.go
- unprocessableentityerrorresponse.go