File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
validator/src/main/java/com/amazon/aoc/callers Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 66import com .amazon .aoc .helpers .RetryHelper ;
77import com .amazon .aoc .models .SampleAppResponse ;
88import com .fasterxml .jackson .core .JsonProcessingException ;
9- import com .fasterxml .jackson .databind .JsonMappingException ;
109import com .fasterxml .jackson .databind .ObjectMapper ;
1110import lombok .extern .log4j .Log4j2 ;
1211import okhttp3 .OkHttpClient ;
@@ -39,14 +38,16 @@ public SampleAppResponse callSampleApp() throws Exception {
3938 throw new BaseException (ExceptionCode .DATA_EMITTER_UNAVAILABLE );
4039 }
4140 SampleAppResponse sampleAppResponse = null ;
42- try {
43- sampleAppResponse = new ObjectMapper ().readValue (responseBody , SampleAppResponse .class );
44- }catch (JsonProcessingException ex ){
41+ try {
42+ sampleAppResponse =
43+ new ObjectMapper ().readValue (responseBody , SampleAppResponse .class );
44+ } catch (JsonProcessingException ex ) {
4545 // try to get the trace id from header
4646 // this is a specific logic for xray sdk, which injects trace id in header
4747 log .info ("getting trace id from header" );
4848 // X-Amzn-Trace-Id: Root=1-5f84a611-f2f5df6827016222af9d8b60
49- String traceId = response .header (GenericConstants .HTTP_HEADER_TRACE_ID .getVal ()).substring (5 );
49+ String traceId =
50+ response .header (GenericConstants .HTTP_HEADER_TRACE_ID .getVal ()).substring (5 );
5051 sampleAppResponse = new SampleAppResponse ();
5152 sampleAppResponse .setTraceId (traceId );
5253 }
You can’t perform that action at this time.
0 commit comments