private void throwPaynovaHttpException(HttpEvent httpEvent, boolean connectionStatusOk) {
		JsonParser parser = new JsonParserImpl();
        StatusWrapper sw = null;
        try{
        	sw = parser.fromJson(httpEvent.getResponseBody(), StatusWrapper.class);
        }catch(Exception e){}
        
        if(sw!=null && sw.getStatus()!=null && !sw.getStatus().getIsSuccess()) {
        	throw new PaynovaHttpException(httpEvent, 
        			sw.getStatus(),
        			sw.getStatus().getStatusMessage()+"\n"+
        			sw.getStatus().getAllErrorsAsString("\n")
        			);
        } else if(!connectionStatusOk) {
        	throw new PaynovaHttpException(httpEvent,httpEvent.getResponseHeadersAsString("\n"));
        }
		
	}