API ReferenceExceptions

Exceptions

Error types raised by the MinT API

Base Exceptions

TinkerError

Root exception for all MinT errors.

All MinT-specific exceptions inherit from this class.

APIError

Base class for API-related errors.

Properties:

  • body - Response body containing error details

Connection Errors

APIConnectionError

Raised when connection to the MinT server fails.

APITimeoutError

Raised when a request times out.

Inherits from: APIConnectionError

APIResponseValidationError

Raised when server response doesn’t match expected schema.

HTTP Status Errors

ExceptionStatus CodeDescription
BadRequestError400Invalid request format or parameters
AuthenticationError401Missing or invalid credentials
PermissionDeniedError403Insufficient permissions for operation
NotFoundError404Requested resource doesn’t exist
ConflictError409Resource state conflict
UnprocessableEntityError422Request is semantically invalid
RateLimitError429Too many requests (rate limit exceeded)
InternalServerError500+Server-side error

Async Errors

RequestFailedError

Raised when an async request fails to complete successfully.

Usage Example

import mint
from mint.exceptions import (
    AuthenticationError,
    NotFoundError,
    RateLimitError
)
 
try:
    service_client = mint.ServiceClient()
    training_client = service_client.create_lora_training_client(
        base_model="Qwen/Qwen3-4B-Instruct-2507"
    )
except AuthenticationError:
    print("Invalid API key")
except NotFoundError:
    print("Model not found")
except RateLimitError:
    print("Rate limit exceeded, please wait")
except mint.TinkerError as e:
    print(f"MinT error: {e}")