File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
src/main/java/de/samply/directory_sync_service Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 10
10
</parent >
11
11
<groupId >de.samply</groupId >
12
12
<artifactId >directory_sync_service</artifactId >
13
- <version >1.5.11 </version >
13
+ <version >1.5.12 </version >
14
14
<name >directory_sync_service</name >
15
15
<description >Directory sync</description >
16
16
<url >https://github.com/samply/directory_sync_service</url >
Original file line number Diff line number Diff line change @@ -96,13 +96,26 @@ public boolean login() {
96
96
97
97
String endpoint = directoryEndpointsGraphql .getLoginEndpoint ();
98
98
JsonObject result = directoryCallsGraphql .runGraphqlCommand (endpoint , graphqlCommand );
99
-
100
99
if (result == null ) {
101
100
logger .warn ("login: result is null" );
102
101
return false ;
103
102
}
104
103
105
- String token = result .get ("signin" ).getAsJsonObject ().get ("token" ).getAsString ();
104
+ JsonElement signin = result .get ("signin" );
105
+ if (signin == null ) {
106
+ logger .warn ("login: signin is null" );
107
+ logger .warn ("login: result: " + Util .jsonStringFomObject (result ));
108
+ return false ;
109
+ }
110
+
111
+ JsonElement tokenObject = signin .getAsJsonObject ().get ("token" );
112
+ if (tokenObject == null ) {
113
+ logger .warn ("login: tokenObject is null" );
114
+ logger .warn ("login: signin: " + Util .jsonStringFomObject (signin ));
115
+ return false ;
116
+ }
117
+
118
+ String token = tokenObject .getAsString ();
106
119
if (token == null ) {
107
120
logger .warn ("login: token is null" );
108
121
return false ;
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ public Patient extractPatientFromSpecimen(Specimen specimen) {
382
382
.replaceFirst ("Patient/" , "" ))
383
383
.execute ();
384
384
} catch (Exception e ) {
385
- logger .warn ("extractPatientFromSpecimen: caught exception" , Util .traceFromException (e ));
385
+ logger .warn ("extractPatientFromSpecimen: caught exception: " + Util .traceFromException (e ));
386
386
}
387
387
388
388
return patient ;
You can’t perform that action at this time.
0 commit comments