summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-12 08:55:30 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-12 08:55:30 +0200
commit2d152ba32d048e1e97438d99dd24ed5a32a6b961 (patch)
treefb0aedfde1cf57de7a9e2b36622f62657040faf1 /exports
parent4a25897ab3e048b8b59c25d50f7f314d21847f2e (diff)
Types Error: Do not panic on JSON error
Diffstat (limited to 'exports')
-rw-r--r--exports/exports.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/exports/exports.go b/exports/exports.go
index daf84bb..b4eb909 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -114,7 +114,11 @@ func ErrorToString(error error) string {
return ""
}
- return eduvpn.GetErrorJSONString(error)
+ errorString, jsonErr := eduvpn.GetErrorJSONString(error)
+ if jsonErr != nil {
+ return ""
+ }
+ return errorString
}
//export CancelOAuth