package com.flightticket.exception;

/**
 * Exception thrown when rate limit is exceeded
 * Requirements: 14.2
 */
public class RateLimitExceededException extends RuntimeException {
    
    private final String agencyId;
    private final String endpoint;
    private final int retryAfterSeconds;
    
    public RateLimitExceededException(String agencyId, String endpoint, int retryAfterSeconds) {
        super(String.format("Rate limit exceeded for agency %s on endpoint %s. Retry after %d seconds.", 
            agencyId, endpoint, retryAfterSeconds));
        this.agencyId = agencyId;
        this.endpoint = endpoint;
        this.retryAfterSeconds = retryAfterSeconds;
    }
    
    public String getAgencyId() {
        return agencyId;
    }
    
    public String getEndpoint() {
        return endpoint;
    }
    
    public int getRetryAfterSeconds() {
        return retryAfterSeconds;
    }
}
