@secrecy/lib 1.75.4 → 1.75.6
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.
|
@@ -43,16 +43,15 @@ export async function downloadDataFromLink(opts) {
|
|
|
43
43
|
// console.error(err)
|
|
44
44
|
// throw new Error('Unable to parse data link json!', { cause: err })
|
|
45
45
|
// })
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
throw new Error('Unable to parse data link json!', { cause: err });
|
|
49
|
-
});
|
|
46
|
+
const arrayBuffer = await rawDataLinkRes.arrayBuffer();
|
|
47
|
+
const rawDataLinkText = new TextDecoder().decode(arrayBuffer);
|
|
50
48
|
let rawDataLink = '';
|
|
51
49
|
try {
|
|
52
50
|
rawDataLink = JSON.parse(rawDataLinkText);
|
|
53
51
|
}
|
|
54
52
|
catch (err) {
|
|
55
53
|
console.error(err);
|
|
54
|
+
console.log('rawDataLinkText:', rawDataLinkText);
|
|
56
55
|
throw new Error('Unable to parse data link json!', { cause: err });
|
|
57
56
|
}
|
|
58
57
|
const dataLink = downloadDataLinkSchema.safeParse(rawDataLink);
|
package/package.json
CHANGED