* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
private static Logger log = Logger.getLogger(RestServiceImpl.class.getName());
private static final String INTERNAL_ERROR_MSG = "Internal error occured while processing the request.";
private static final String ERROR="error";
-
+ private static final String ERROR_500="err-0500";
@Autowired SpringService service;
return buildErrorResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", INTERNAL_ERROR_MSG));
+ response.put(ERROR, buildErrorResponse(ERROR_500, INTERNAL_ERROR_MSG));
return buildErrorResponse(response);
}
}
return buildErrorResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", INTERNAL_ERROR_MSG));
+ response.put(ERROR, buildErrorResponse(ERROR_500, INTERNAL_ERROR_MSG));
return buildErrorResponse(response);
}
}
return buildResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", e.getMessage()));
+ response.put(ERROR, buildErrorResponse(ERROR_500, e.getMessage()));
return buildErrorResponse(response);
}
}