/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:94
const err = new errors.IOWS2ResponseError(`Unexpected http status code ${response.status}`);
^
IOWS2ResponseError: Unable to receive product 30346934 availability for store 483 status code: 400 Bad Request using url: https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934
at /usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:94:23
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 1) {
request: {
url: 'https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934',
params: {
headers: {
Accept: 'application/vnd.ikea.iows+json;version=1.0',
Contract: '37249',
Consumer: 'MAMMUT'
}
}
},
response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: <ref *1> Gunzip {
_writeState: Uint32Array(2) [ 0, 0 ],
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: null,
ended: false,
endEmitted: false,
reading: false,
constructed: true,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: null
},
_events: [Object: null prototype] {
prefinish: [Function: prefinish],
error: [Function (anonymous)]
},
_eventsCount: 2,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: true,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: true,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: true,
bytesWritten: 0,
_handle: Zlib {
onerror: [Function: zlibOnError],
buffer: Buffer(0) [Uint8Array] [],
cb: [Function (anonymous)],
availOutBefore: 16384,
availInBefore: 0,
inOff: 0,
flushFlag: 2,
[Symbol(owner_symbol)]: [Circular *1]
},
_outBuffer: Buffer(16384) [Uint8Array] [
176, 203, 210, 182, 176, 203, 210, 182, 72, 240, 45, 4,
72, 240, 45, 4, 0, 0, 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 128, 240, 45, 4, 255, 255, 255, 255,
10, 0, 0, 0, 255, 255, 255, 255, 49, 0, 0, 0,
0, 0, 0, 0, 128, 0, 0, 0, 49, 133, 236, 92,
89, 133, 236, 92, 129, 133, 236, 92, 169, 133, 236, 92,
8, 241, 45, 4, 8, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 164, 240, 45, 4, 0, 0, 0, 0,
172, 240, 45, 4,
... 16284 more items
],
_outOffset: 0,
_chunkSize: 16384,
_defaultFlushFlag: 2,
_finishFlushFlag: 2,
_defaultFullFlushFlag: 3,
_info: undefined,
_maxOutputLength: 1073741823,
_level: -1,
_strategy: 0,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null,
[Symbol(kError)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934',
status: 400,
statusText: 'Bad Request',
headers: Headers {
[Symbol(map)]: [Object: null prototype] {
'x-backside-transport': [ 'FAIL FAIL,FAIL FAIL' ],
'content-type': [ 'text/xml' ],
'unique-rq-id': [ '1622021866-568f4f7' ],
'x-global-transaction-id': [ '34ed051960ae16ea0076f571' ],
'content-encoding': [ 'gzip' ],
'content-length': [ '0' ],
date: [ 'Wed, 26 May 2021 09:37:46 GMT' ],
connection: [ 'close' ],
vary: [ 'Accept-Encoding' ],
'x-content-type-options': [ 'nosniff' ],
'strict-transport-security': [ 'max-age=31536000' ],
server: [ 'IITP Server' ]
}
},
counter: 0
}
}
}
As Belgium has two languages, it might be "fr" or "nl".
Unfortunately I have been trying to send a request with postman to test this assumption but I am always getting error 400, even by adding the headers: