MagickMind
Python

Exceptions

Reference for magick_mind.exceptions.

magick_mind.exceptions

Custom exceptions for Magick Mind SDK.

MagickMindError

class MagickMindError(Exception)

Base exception for all Magick Mind SDK errors.

AuthenticationError

class AuthenticationError(MagickMindError)

Raised when authentication fails.

TokenExpiredError

class TokenExpiredError(AuthenticationError)

Raised when a token has expired.

RateLimitError

class RateLimitError(MagickMindError)

Raised when rate limit is exceeded.

ProblemDetailsException

class ProblemDetailsException(MagickMindError)

RFC 7807 Problem Details error from the Magick Mind API.

ValidationError

class ValidationError(ProblemDetailsException)

400 Bad Request with field-level validation errors.

ValidationError.get_field_errors

def get_field_errors() -> dict[str, list[str]]

Get errors grouped by field name for UI display.

Note: Returns simplified dict[field, messages]. Access validation_errors directly if you need error codes (e.g., "required", "invalid_format").

On this page