From 4fd172d0dc4add99bb9752e6dfef1c913e71f25d Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 30 Oct 2024 11:02:00 +0530 Subject: [PATCH] fix: identity removed --- src/Utilities/Utils.res | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Utilities/Utils.res b/src/Utilities/Utils.res index 5f304b3b..20267d55 100644 --- a/src/Utilities/Utils.res +++ b/src/Utilities/Utils.res @@ -888,16 +888,16 @@ let formatException = exc => Exn.fileName(obj), ) [ - ("message", message->Identity.anyTypeToJson), - ("type", name->Identity.anyTypeToJson), - ("stack", stack->Identity.anyTypeToJson), - ("fileName", fileName->Identity.anyTypeToJson), + ("message", message->Option.getOr("Unknown Error")->JSON.Encode.string), + ("type", name->Option.getOr("Unknown")->JSON.Encode.string), + ("stack", stack->Option.getOr("Unknown")->JSON.Encode.string), + ("fileName", fileName->Option.getOr("Unknown")->JSON.Encode.string), ] | _ => [ - ("message", "Unknown error"->Identity.anyTypeToJson), - ("type", "Unknown"->Identity.anyTypeToJson), - ("stack", "Unknown"->Identity.anyTypeToJson), - ("fileName", "Unknown"->Identity.anyTypeToJson), + ("message", "Unknown error"->JSON.Encode.string), + ("type", "Unknown"->JSON.Encode.string), + ("stack", "Unknown"->JSON.Encode.string), + ("fileName", "Unknown"->JSON.Encode.string), ] }->getJsonFromArrayOfJson