in src/main/java/com/amazonaws/sagemaker/controller/ServingController.java [162:186]
public ResponseEntity<String> transformRequestJsonLines(
@RequestBody final byte[] jsonLines,
@RequestHeader(value = HttpHeaders.ACCEPT, required = false)
final String accept) {
if (jsonLines == null) {
LOG.error("Input passed to the request is null");
return ResponseEntity.badRequest().build();
} else if (jsonLines.length == 0) {
LOG.error("Input passed to the request is empty");
return ResponseEntity.noContent().build();
}
try {
final String acceptVal = this.retrieveAndVerifyAccept(accept);
return this.processInputDataForJsonLines(new String(jsonLines), acceptVal);
} catch (final Exception ex) {
LOG.error("Error in processing current request", ex);
return ResponseEntity.badRequest().body(ex.getMessage());
}
}