package com.usoftchina.qywx.sdk.exception;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

/**
 * @author yingp
 */
public class WeiXinAccessException extends RuntimeException {
    private final HttpStatus status;

    public WeiXinAccessException(ResponseEntity resp) {
        super(String.valueOf(resp.getBody()));
        this.status = resp.getStatusCode();
    }

    public HttpStatus getStatus() {
        return status;
    }
}
