Skip to content

Instantly share code, notes, and snippets.

@cboulanger
Created April 11, 2021 07:31
Show Gist options
  • Save cboulanger/cf4d31f038303897136b0730454e60c3 to your computer and use it in GitHub Desktop.
Save cboulanger/cf4d31f038303897136b0730454e60c3 to your computer and use it in GitHub Desktop.
zotero-upload-error.txt
ErrorResponse: Upload stage 2: 400: Bad Request
//snip
response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: false, error: null },
[Symbol(Response internals)]: {
url: 'https://zoterofilestorage.s3.us-east-1.amazonaws.com/',
status: 400,
statusText: 'Bad Request',
headers: [Headers],
counter: 0
}
},
reason: '<?xml version="1.0" encoding="UTF-8"?>\n' +
'<Error><Code>BadDigest</Code><Message>The Content-MD5 you specified did not match what we received.</Message><ExpectedDigest>d530c9e6ecaf0cff76ddc56f2fbe81e1</ExpectedDigest><CalculatedDigest>kAZn6nEde6Giw3e5UiHI3Q==</CalculatedDigest><RequestId>PRYMARR14QG1R3ZD</RequestId><HostId>WNKXSjy4QemC5/8NJFevifr7n2a4tTUNLh29nWy/MyaC6uk4giVRmhIWUBgkwX+1A+S+/juLDvw=</HostId></Error>',
options: {
apiAuthorityPart: 'api.zotero.org',
cache: 'default',
contentType: 'application/x-www-form-urlencoded',
credentials: 'omit',
format: null,
method: 'post',
mode: 'cors',
pretend: false,
redirect: 'follow',
resource: { library: 'xxx', items: 'xxx', file: null },
// snip
zoteroApiKey: 'xxx',
ifNoneMatch: '*',
fileName: 'myfile.txt',
file: ArrayBuffer {
[Uint8Contents]: <7b 0a 20 20 20 20 22 69 74 65 6d 54 79 70 65 22 3a 20 22 61 74 74 61 63 68 6d 65 6e 74 22 2c 0a 20 20 20 20 22 6c 69 6e 6b 4d 6f 64 65 22 3a 20 22 69 6d 70 6f 72 74 65 64 5f 66 69 6c 65 22 2c 0a 20 20 20 20 22 74 69 74 6c 65 22 3a 20 22 22 2c 0a 20 20 20 20 22 61 63 63 65 73 73 44 61 74 65 22 3a 20 ... 8092 more bytes>,
byteLength: 8192
},
mtime: null,
body: undefined,
retryCount: 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment