package com.oqpo.api.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(value= HttpStatus.UNAUTHORIZED, reason="Unauthorized") //401
public class UnauthorizedException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	
    private String errorMessage;

    public String getErrorMessage(){
        return errorMessage;
    }

    public UnauthorizedException(String errorMessage){
        super(errorMessage);
        this.errorMessage = errorMessage;
    }

    public UnauthorizedException(){
        super();
    }
}