Versions in this module Expand all Collapse all v0 v0.1.0 Mar 23, 2025 Changes in this version + const CodeAPIDeprecated + const CodeAPIVersionUnsupported + const CodeBlockchainError + const CodeContractExecutionFailed + const CodeDatabaseError + const CodeExecutionTimeout + const CodeFunctionCompileError + const CodeFunctionRuntimeError + const CodeInsufficientGas + const CodeInternalError + const CodeInvalidCredentials + const CodeInvalidFormat + const CodeInvalidParameter + const CodeInvalidState + const CodeMemoryLimitExceeded + const CodeMissingParameter + const CodeNetworkFeeTooLow + const CodePermissionDenied + const CodeRateLimitExceeded + const CodeResourceAlreadyExists + const CodeResourceConflict + const CodeResourceNotFound + const CodeSandboxViolation + const CodeSecretAccessDenied + const CodeServiceUnavailable + const CodeTokenExpired + const CodeTxVerificationFailed + const CodeUnauthorized + type ServiceError struct + Code string + Details map[string]interface{} + HTTPCode int + Message string + RequestID string + func FromError(err error) *ServiceError + func NewAPIDeprecatedError(version string, sunsetDate string) *ServiceError + func NewAPIVersionUnsupportedError(requestedVersion string, supportedVersions []string) *ServiceError + func NewBlockchainError(operation string, err error) *ServiceError + func NewContractExecutionFailedError(contractHash, operation, reason string) *ServiceError + func NewDatabaseError(operation string, err error) *ServiceError + func NewExecutionTimeoutError(functionID string, timeout int) *ServiceError + func NewFunctionCompileError(functionID string, errors []string) *ServiceError + func NewFunctionRuntimeError(functionID string, errorMessage string, stackTrace string) *ServiceError + func NewInsufficientGasError(required, available int64) *ServiceError + func NewInternalError(message string) *ServiceError + func NewInvalidCredentialsError() *ServiceError + func NewInvalidFormatError(message string) *ServiceError + func NewInvalidParameterError(paramName, reason string) *ServiceError + func NewInvalidStateError(message string) *ServiceError + func NewMemoryLimitExceededError(functionID string, limit int) *ServiceError + func NewMissingParameterError(paramName string) *ServiceError + func NewNetworkFeeTooLowError(required, provided int64) *ServiceError + func NewPermissionDeniedError(resource, action string) *ServiceError + func NewRateLimitExceededError(limit int, timeWindow string) *ServiceError + func NewResourceAlreadyExistsError(resourceType, resourceID string) *ServiceError + func NewResourceConflictError(resourceType, resourceID, reason string) *ServiceError + func NewResourceNotFoundError(resourceType, resourceID string) *ServiceError + func NewSandboxViolationError(functionID, violation string) *ServiceError + func NewSecretAccessDeniedError(functionID, secretName string) *ServiceError + func NewServiceUnavailableError(reason string) *ServiceError + func NewTokenExpiredError() *ServiceError + func NewTxVerificationFailedError(reason string) *ServiceError + func NewUnauthorizedError() *ServiceError + func (e *ServiceError) Error() string + func (e *ServiceError) ToResponse() map[string]interface{} + func (e *ServiceError) WithDetailField(key string, value interface{}) *ServiceError + func (e *ServiceError) WithDetails(details map[string]interface{}) *ServiceError + func (e *ServiceError) WithRequestID(requestID string) *ServiceError