Exceptions

Clash Of Clans Exception

struct clashy.ClashOfClansException

ClashOfClansException is the base package error type.

Message

string

Message is the human-readable error message.

HTTPException

struct clashy.HTTPException

HTTPException captures a non-successful API response.

The typed HTTP errors in this package embed HTTPException so callers can match either the specific type or inspect shared status, reason, message, and body fields.

Status

int

Status is the HTTP status code returned by the API. It can be zero for transport failures mapped to GatewayError.

Reason

string

Reason is the API reason string when one was provided.

Message

string

Message is the API message string when one was provided.

Body

[]byte

Body is the raw response body retained for debugging.

Invalid Argument

struct clashy.InvalidArgument

InvalidArgument represents a 400 response from the API.

HTTPException

*HTTPException

Invalid Credentials

struct clashy.InvalidCredentials

InvalidCredentials represents a developer-site authentication failure.

HTTPException

*HTTPException

Forbidden

struct clashy.Forbidden

Forbidden represents a 403 response from the API.

HTTPException

*HTTPException

Private War Log

struct clashy.PrivateWarLog

PrivateWarLog represents the private-war-log 403 response.

HTTPException

*HTTPException

Not Found

struct clashy.NotFound

NotFound represents a 404 response from the API.

HTTPException

*HTTPException

Maintenance

struct clashy.Maintenance

Maintenance represents a 503 maintenance response from the API.

HTTPException

*HTTPException

Gateway Error

struct clashy.GatewayError

GatewayError represents transport failures and 5xx gateway responses.

HTTPException

*HTTPException