Java Code Examples for org.springframework.http.HttpStatus#FAILED_DEPENDENCY

The following examples show how to use org.springframework.http.HttpStatus#FAILED_DEPENDENCY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PoiWorkBook.java    From CheckPoint with Apache License 2.0 5 votes vote down vote up
private void checkDependency() {
    try {
       Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
    } catch (ClassNotFoundException e) {
        throw new ValidationLibException("Not found apache POI library, must import poi to your maven or gradle dependency", HttpStatus.FAILED_DEPENDENCY);
    }
}
 
Example 2
Source File: ClientfacingErrorITest.java    From backstopper with Apache License 2.0 4 votes vote down vote up
@RequestMapping("/throw4xxServerHttpStatusCodeException")
public void throw4xxServerHttpStatusCodeException() {
    HttpClientErrorException serverResponseEx = new HttpClientErrorException(HttpStatus.FAILED_DEPENDENCY, "ignoreme", responseBodyForDownstreamServiceError(), null);
    throw new ServerHttpStatusCodeException(new Exception("Intentional test exception"), "FOO", serverResponseEx, serverResponseEx.getStatusCode().value(), serverResponseEx.getResponseHeaders(), serverResponseEx.getResponseBodyAsString());
}