* org.onap.dmaap
* ================================================================================
* Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
@Override
public Response toResponse(WebApplicationException ex) {
- //System.out.println("--------------------------------------------------"+ex);
LOGGER.info("Reached WebException Mapper");
/**
errRes = new ErrorResponse(errCode,dmaapErrCode,errMsg);
LOGGER.info(errRes.toString());
- Response response = Response.status(errRes.getHttpStatusCode()).header("exception",
+ return Response.status(errRes.getHttpStatusCode()).header("exception",
errRes.getErrMapperStr()).build();
-
- return response;
-
}
/**
* UnAuthorized
getResponseCode(),msgs.getAuthFailure());
LOGGER.info(errRes.toString());
- Response response = Response.status(errRes.getHttpStatusCode()).header("exception",
+ return Response.status(errRes.getHttpStatusCode()).header("exception",
errRes.getErrMapperStr()).build();
-
- return response;
}
/**
* Malformed request
getResponseCode(),msgs.getBadRequest());
LOGGER.info(errRes.toString());
- Response response = Response.status(errRes.getHttpStatusCode()).header("exception",
+ return Response.status(errRes.getHttpStatusCode()).header("exception",
errRes.getErrMapperStr()).build();
-
- return response;
}
/**
* HTTP Method not allowed
getResponseCode(),msgs.getMethodNotAllowed());
LOGGER.info(errRes.toString());
- Response response = Response.status(errRes.getHttpStatusCode()).header("exception",
+ return Response.status(errRes.getHttpStatusCode()).header("exception",
errRes.getErrMapperStr()).build();
-
- return response;
}
/**
getResponseCode(),msgs.getServerUnav());
LOGGER.info(errRes.toString());
- Response response = Response.status(errRes.getHttpStatusCode()).header("exception",
+ return Response.status(errRes.getHttpStatusCode()).header("exception",
errRes.getErrMapperStr()).build();
-
- return response;
}