

package com.nantian.sc.cloud.common.security.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nantian.sc.cloud.common.security.component.ScAuth2ExceptionSerializer;
import org.springframework.http.HttpStatus;

/**
 *
 * @date 2018/7/8
 */
@JsonSerialize(using = ScAuth2ExceptionSerializer.class)
public class MethodNotAllowedException extends ScAuth2Exception {

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

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

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

}
