@runtypelabs/sdk 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7969,7 +7969,9 @@ var RuntypeClient2 = class {
|
|
|
7969
7969
|
} catch {
|
|
7970
7970
|
errorData = { error: "Unknown error occurred" };
|
|
7971
7971
|
}
|
|
7972
|
-
const
|
|
7972
|
+
const baseMessage = isObjectRecord(errorData) && (typeof errorData.error === "string" || typeof errorData.message === "string") ? errorData.error || errorData.message || "Request failed" : "Request failed";
|
|
7973
|
+
const details = isObjectRecord(errorData) && typeof errorData.details === "string" ? errorData.details : void 0;
|
|
7974
|
+
const message = details ? `${baseMessage}: ${details}` : baseMessage;
|
|
7973
7975
|
return new RuntypeApiError(
|
|
7974
7976
|
message,
|
|
7975
7977
|
response.status,
|
package/dist/index.mjs
CHANGED
|
@@ -7899,7 +7899,9 @@ var RuntypeClient2 = class {
|
|
|
7899
7899
|
} catch {
|
|
7900
7900
|
errorData = { error: "Unknown error occurred" };
|
|
7901
7901
|
}
|
|
7902
|
-
const
|
|
7902
|
+
const baseMessage = isObjectRecord(errorData) && (typeof errorData.error === "string" || typeof errorData.message === "string") ? errorData.error || errorData.message || "Request failed" : "Request failed";
|
|
7903
|
+
const details = isObjectRecord(errorData) && typeof errorData.details === "string" ? errorData.details : void 0;
|
|
7904
|
+
const message = details ? `${baseMessage}: ${details}` : baseMessage;
|
|
7903
7905
|
return new RuntypeApiError(
|
|
7904
7906
|
message,
|
|
7905
7907
|
response.status,
|
package/package.json
CHANGED