more logging

This commit is contained in:
James Brumond 2023-08-18 20:42:32 -07:00
parent 24512ad125
commit 4d4170efa7
Signed by: james
GPG Key ID: E8F2FC44BAA3357A
3 changed files with 9 additions and 9 deletions

8
dist/index.js vendored
View File

@ -2888,12 +2888,12 @@ async function main() {
}
async function get_manifest(url_str) {
const { status, body } = await http_req('GET', url_str, {
const { status, headers, body } = await http_req('GET', url_str, {
accept: manifest_media_type,
});
if (status !== 200) {
console.error('get manifest response', { status, body });
console.error('get manifest response', { status, headers, body });
throw new Error('failed to fetch existing manifest');
}
@ -2901,12 +2901,12 @@ async function get_manifest(url_str) {
}
async function put_manifest(url_str, manifest) {
const { status } = await http_req('PUT', url_str, {
const { status, headers, body } = await http_req('PUT', url_str, {
'content-type': manifest_media_type,
}, manifest);
if (status >= 400) {
console.error('get manifest response', { status, body });
console.error('get manifest response', { status, headers, body });
throw new Error('failed to put manifest');
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -35,12 +35,12 @@ async function main() {
}
async function get_manifest(url_str) {
const { status, body } = await http_req('GET', url_str, {
const { status, headers, body } = await http_req('GET', url_str, {
accept: manifest_media_type,
});
if (status !== 200) {
console.error('get manifest response', { status, body });
console.error('get manifest response', { status, headers, body });
throw new Error('failed to fetch existing manifest');
}
@ -48,12 +48,12 @@ async function get_manifest(url_str) {
}
async function put_manifest(url_str, manifest) {
const { status } = await http_req('PUT', url_str, {
const { status, headers, body } = await http_req('PUT', url_str, {
'content-type': manifest_media_type,
}, manifest);
if (status >= 400) {
console.error('get manifest response', { status, body });
console.error('get manifest response', { status, headers, body });
throw new Error('failed to put manifest');
}
}