more logging
This commit is contained in:
parent
24512ad125
commit
4d4170efa7
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -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
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
8
index.js
8
index.js
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user