SDK does not expose error mesages
Monday, March 13, 2017 at 03:54amThe following code does not return the specific error message.
try { PackageId packageId = eslClient.CreatePackage(documentPackage); } catch (Silanis.ESL.SDK.ServerError ex) { //What caused the error? }Is there a special way to get the actual error code from the SDK (Version 11.0.1.0 of the Silanis.ESL.dll) without rewriting the SDK to expose real errors and codes (like it does for the java SDK)? Using the above code, we included a bad connection string (to a non-existent URL) on purpose, and are getting error message like the following when using the SDK: Error returned as a string: Silanis.ESL.SDK.EslException: Could not get application version. Exception: Unexpected character encountered while parsing value: . Path â€, line 1, position 1. —> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Path â€, line 1, position 1. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.ReadInternal() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Silanis.ESL.SDK.SystemService.GetApplicationVersion() — End of inner exception stack trace — at Silanis.ESL.SDK.SystemService.GetApplicationVersion() Why the real error is important: - A connectivity error might mean we take action to notify the Operations group to ensure connectivity is up. - A user account error might tell us to notify the account owner we have on record to take action. I can tell you that the final response that "MWilliams" got from R&D on the following forum thread is incorrect (see above error message) when using the client SDK. https://developer.esignlive.com/forums/topic/list-of-error-codes-error-messages-error-name/ I’m looking forward to determining how the real errors can be found, without everyone who uses the SDK needing to rewrite it to get those real error codes.
Reply to: SDK does not expose error mesages
Monday, March 13, 2017 at 05:51amReply to: SDK does not expose error mesages
Monday, March 13, 2017 at 09:21am