Hi
See the following output from devtools:
"debug": {
"message": "Web Request failed with status 503 Service Unavailable",
"url": "https://api.sandbox.roadlink.app/sync_house_consignment?transport_mode=road",
"statusCode": 503,
"statusText": "Service Unavailable",
"responseHeaders": {
"date": "Wed, 23 Sep 2026 13:01:52 GMT",
"content-type": "application/json",
"content-length": "40",
"connection": "keep-alive",
"x-roadlink-error-source": "digitoll",
"x-digitoll-error-stage": "submission",
"apigw-requestid": "EJ0ShiFhAi0EN7Q="
},
"responseData": {
"message": "Endpoint request timed out"
}
},
Is it possible to fetch the 2 http respoonse headers:
“x-roadlink-error-source”: “digitoll”,
"x-digitoll-error-stage": "submission",
By using the result parser? Current code: const debug = {
httpStatusCode,
code,
name,
message,
body
}
return {
allData: JSON.stringify(debug),
name,
message,
body,
code,
httpStatusCode,
}
Something like this:
const errorSource = responseHeaders?.[“x-roadlink-error-source”] ?? null; const errorStage = responseHeaders?.[“x-digitoll-error-stage”] ?? null;
I want to map these headers (if they exist) to my database for error handling.
Is it possible?
thanks