alert the client that they need to specify header
Issue-ID: AAI-454
Change-Id: I2032163172bbb987c060b41dcffc494d18c58b13
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
+import org.onap.aai.exceptions.AAIException;
import org.slf4j.MDC;
import com.att.eelf.configuration.EELFLogger;
import org.slf4j.MDC;
import com.att.eelf.configuration.EELFLogger;
MDC.put(LoggingField.REQUEST_ID.toString(), requestId.toString());
}
MDC.put(LoggingField.REQUEST_ID.toString(), requestId.toString());
}
- public static void requestId(String requestId) {
+ public static void requestId(String requestId) throws AAIException {
+
+ if(requestId == null){
+ throw new AAIException("AAI_4010");
+ }
+
try {
if (requestId.contains(":")) {
String[] uuidParts = requestId.split(":");
try {
if (requestId.contains(":")) {
String[] uuidParts = requestId.split(":");
- public void testRequestId() { //AKA Transaction ID
+ public void testRequestId() throws Exception { //AKA Transaction ID
final String sUuid = "57d51eaa-edc6-4f50-a69d-f2d4d2445120";
LoggingContext.requestId(sUuid);
final String sUuid = "57d51eaa-edc6-4f50-a69d-f2d4d2445120";
LoggingContext.requestId(sUuid);