Examples of ResponseException


Examples of com.tinkerpop.gremlin.driver.exception.ResponseException

                        pending.get(response.getRequestId()).add(response);
                    }
                } else if (response.getStatus().getCode() == ResponseStatusCode.SUCCESS_TERMINATOR)
                    pending.remove(response.getRequestId()).markComplete();
                else
                    pending.get(response.getRequestId()).markError(new ResponseException(response.getStatus().getCode(), response.getStatus().getMessage()));
            } finally {
                ReferenceCountUtil.release(response);
            }
        }
View Full Code Here

Examples of com.tinkerpop.gremlin.driver.exception.ResponseException

            this.shell.getInterp().getContext().setProperty(RESULT, resultSet);
            return resultSet.stream().map(result -> result.getObject()).iterator();
        } catch (Exception ex) {
            final Optional<ResponseException> inner = findResponseException(ex);
            if (inner.isPresent()) {
                final ResponseException responseException = inner.get();
                if (responseException.getResponseStatusCode() == ResponseStatusCode.SERVER_ERROR_SERIALIZATION)
                    return String.format("Server could not serialize the result requested. Server error - %s. Note that the class must be serializable by the client and server for proper operation.", responseException.getMessage());
                else
                    return responseException.getMessage();
            } else if (ex.getCause() != null)
                return ex.getCause().getMessage();
            else
                return ex.getMessage();
        }
View Full Code Here

Examples of org.agorava.api.exception.ResponseException

    @Override
    public <T> T mapToObject(Response resp, Class<T> clazz) throws ResponseException {

        String msg = "";
        if (resp.getCode() != 200) {
            throw new ResponseException(resp);
        }
        try {
            msg = resp.getBody();
            if (clazz.equals(String.class))
                return (T) msg;
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

      if (securityException != null) {
        return securityException;
      }
    }

    return new ResponseException(response.getStatusText(), response);
  }
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

            else {
              remoteCallback.callback(demarshallingCallback.demarshallResponse(response.getText()));
            }
          }
          else {
            ResponseException throwable = new ResponseException(response.getStatusText(), response);
            handleError(throwable, response);
          }
        }
      });
    }
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

            else {
              remoteCallback.callback(demarshallingCallback.demarshallResponse(response.getText()));
            }
          }
          else {
            ResponseException throwable = new ResponseException(response.getStatusText(), response);
            handleError(throwable, request, response);
          }
        }
      });
    }
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

            Throwable throwable = null;
            ErrorCallback<?> errorCallback = getErrorCallback();
            if (errorCallback instanceof RestErrorCallback && hasExceptionMapper()) {
              throwable = unmarshallException(response);
            } else if (response.getText() != null && !response.getStatusText().equals("")) {
              throwable = new ResponseException(response.getStatusText(), response);
            } else {
              throwable = new ResponseException("Response returned with status=" + response.getStatusCode(), response);
            }
            handleError(throwable, request, response);
          }
        }
      });
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

            Throwable throwable = null;
            ErrorCallback<?> errorCallback = getErrorCallback();
            if (errorCallback instanceof RestErrorCallback && hasExceptionMapper()) {
              throwable = unmarshallException(response);
            } else {
              throwable = new ResponseException(response.getStatusText(), response);
            }
            handleError(throwable, request, response);
          }
        }
      });
View Full Code Here

Examples of org.jboss.errai.enterprise.client.jaxrs.api.ResponseException

            Throwable throwable = null;
            ErrorCallback<?> errorCallback = getErrorCallback();
            if (errorCallback instanceof RestErrorCallback && hasExceptionMapper()) {
              throwable = unmarshallException(response);
            } else {
              throwable = new ResponseException(response.getStatusText(), response);
            }
            handleError(throwable, request, response);
          }
        }
      });
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.response.ResponseException

  }
 
  private void validatePost(SimpleObject post) throws ResponseException {
    for (int i = 0; i < REQUIRED_FIELDS.length; i++) {
      if (post.get(REQUIRED_FIELDS[i]) == null) {
        throw new ResponseException(
                                    "Required field " + REQUIRED_FIELDS[i] + " not found") {};
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.