package com.tofly.feesapi.security.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import com.tofly.feesapi.security.compent.ToflyAuth2ExceptionSerializer;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

@JsonSerialize(using = ToflyAuth2ExceptionSerializer.class)
public class ToflyAuth2Exception extends OAuth2Exception {
    @Getter
    private String errorCode;

    public ToflyAuth2Exception(String msg) {
        super(msg);
    }

    public ToflyAuth2Exception(String msg, String errorCode) {
        super(msg);
        this.errorCode = errorCode;
    }
}
