package cn.sh.stc.sict.cloud.common.security.exception;

import cn.sh.stc.sict.cloud.common.security.component.SictAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.http.HttpStatus;

/**
 * @author lengleng
 * @date 2018/7/8
 */
@JsonSerialize(using = SictAuth2ExceptionSerializer.class)
public class InvalidException extends SictAuth2Exception {

	public InvalidException(String msg, Throwable t) {
		super(msg);
	}

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

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

}
