diff options
| author | Simon Rettberg | 2016-09-19 15:13:33 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-09-19 15:13:33 +0200 |
| commit | 67adcf3d6be6755520799336b2b3570e8c7436a4 (patch) | |
| tree | 791ee9700c3dc6f725ebfa937ead9577608471b4 /dozentenmodul/src/main/java | |
| parent | [client] Update URLs to FAQ etc. (bwlehrpool.de) (diff) | |
| download | tutor-module-67adcf3d6be6755520799336b2b3570e8c7436a4.tar.gz tutor-module-67adcf3d6be6755520799336b2b3570e8c7436a4.tar.xz tutor-module-67adcf3d6be6755520799336b2b3570e8c7436a4.zip | |
[client] Output debug message if json parsing fails
Diffstat (limited to 'dozentenmodul/src/main/java')
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java index 99c55be6..bf1405bb 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java @@ -145,7 +145,13 @@ public class ShibbolethEcp { LOGGER.debug("SP request returned: " + response.getStatusLine()); final String responseBody = EntityUtils.toString(response.getEntity()); - lastResponse = GSON.fromJson(responseBody, ServiceProviderResponse.class); + try { + lastResponse = GSON.fromJson(responseBody, ServiceProviderResponse.class); + } catch (JsonSyntaxException e) { + LOGGER.warn("Json data from Service Provider malformed", e); + LOGGER.warn("Response was:\n" + responseBody); + throw e; + } // TODO: here we will need to parse the answer accordingly. // no errors, meaning everything worked fine. |
