RestException¶
-
public class
RestException
extends RuntimeException¶ Exception thrown for Http Requests in case of any exception.
Author: naveen
Constructors¶
RestException¶
-
public
RestException
(BatchException exception, List<String> errors)¶ Builds this exception from the provided batch exception and list of errors.
Parameters: - exception – the underlying exception
- errors – list of errors that will be treated as the reason for this exception
RestException¶
-
public
RestException
(BatchException batchException, String reason)¶ Builds this exception given an exception and a reason for it.
Parameters: - batchException – the underlying exception
- reason – the reason of the error
Methods¶
getBatchException¶
-
public BatchException
getBatchException
()¶ Returns: the underlying batch exception
getHttpStatus¶
-
public HttpStatus
getHttpStatus
()¶ Returns: the HTTP status that should be returned for this exception