All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nike.riposte.server.error.exception.Forbidden403Exception Maven / Gradle / Ivy

There is a newer version: 0.20.0
Show newest version
/**
 * 
 */
package com.nike.riposte.server.error.exception;

import com.nike.internal.util.Pair;

import java.util.ArrayList;
import java.util.List;

/**
 * Thrown when a request does not have a valid authorization header. Represents a HTTP 403 response code.
 * 
 * @author pevans
 *
 */
public class Forbidden403Exception extends RuntimeException {

    public final String requestPath;
    public final String authorizationHeader;
    public final List> extraDetailsForLogging;
    
    public Forbidden403Exception(String message, String requestPath, String authorizationHeader) {
        this(message, requestPath, authorizationHeader, new ArrayList<>());
    }

    public Forbidden403Exception(String message, String requestPath, String authorizationHeader,
                                    List> extraDetailsForLogging) {
        super(message);

        this.requestPath = requestPath;
        this.authorizationHeader = authorizationHeader;
        this.extraDetailsForLogging = extraDetailsForLogging;
    }
    private static final long serialVersionUID = 4921880566299500314L;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy