blob: e891d5e2650f5bfe4ac0beabe7b0104b5f1c770d [file] [log] [blame]
/*
* Copyright (c) 2020 Kentyou.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Kentyou - initial API and implementation
*/
package org.eclipse.sensinact.gateway.protocol.http.client.mid;
import java.util.List;
import java.util.Map;
/**
*
*
*/
@SuppressWarnings("serial")
public class HttpResponseException extends Exception {
private int statusCode;
private Map<String, List<String>> headers;
/**
* @param statusCode
* @param content
* @param map
*/
public HttpResponseException(int statusCode, byte[] content, Map<String, List<String>> headers) {
super(content != null ? new String(content) : "Http Error");
this.statusCode = statusCode;
this.headers = headers;
}
/**
* @return
*/
public int getErrorStatusCode() {
return this.statusCode;
}
/**
* @return
*/
public Map<String, List<String>> getHeaders() {
return this.headers;
}
}