2626import okhttp3 .Request ;
2727import okhttp3 .RequestBody ;
2828import okhttp3 .Response ;
29+ import io .sentry .Sentry ;
2930
3031public class CreateClaimGraphQLRequest extends BaseGraphQLRequest {
3132
@@ -47,6 +48,10 @@ public String create(
4748 ) throws Exception {
4849
4950 String clientMutationId = UUID .randomUUID ().toString ();
51+
52+ Sentry .captureMessage (
53+ "CreateClaimGraphQLRequest - clientMutationId generated: " + clientMutationId
54+ );
5055 String fagepFields = "" ;
5156 if (programCode .equals ("PAL" )){
5257 fagepFields = " testNumber: \" " + claim .getTestNumber () + "\" "
@@ -139,6 +144,7 @@ public String create(
139144 + " healthFacilityId: " + hfId
140145 + " program: " + programId
141146 + " visitType: \" " + claim .getVisitType () +"\" "
147+ + " source: \" MOB\" "
142148 + fagepFields
143149 + " services: " + claimServices
144150 + " items: " + claimItems
@@ -195,7 +201,9 @@ public boolean verify(String hostname, SSLSession session) {
195201 .post (body )
196202 .build ();
197203
198-
204+ Sentry .captureMessage (
205+ "CreateClaimGraphQLRequest - HTTP request prepared: " + URI + " - " + clientMutationId + " - " + json .toString ()
206+ );
199207 Response response = httpClient .newCall (request ).execute ();
200208 int responseCode = response .code ();
201209
@@ -204,6 +212,9 @@ public boolean verify(String hostname, SSLSession session) {
204212
205213 String responsePhrase = response .body ().string ();
206214 Log .i ("RESPONSE" , String .format ("response: %d %s" , responseCode , responsePhrase ));
215+ Sentry .captureMessage (
216+ "CreateClaimGraphQLRequest - HTTP response received: " + responseCode + " - " + clientMutationId + " - " + responsePhrase
217+ );
207218
208219 return clientMutationId ;
209220 }
0 commit comments