package com.tofly.feesapi.security.exception;

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

import com.tofly.feesapi.security.compent.ToflyAuth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

@JsonSerialize(using = ToflyAuth2ExceptionSerializer.class)
public class ServerErrorException extends ToflyAuth2Exception{
    public ServerErrorException(String msg, Throwable t) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "server_error";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.INTERNAL_SERVER_ERROR.value();
    }
}
