I followed vitPinchuk’s guide here and it worked
It was necessary to set Access-Control-Expose-Headers
(Node-RED example):
And access necessary header via context.panel.response.headers.get()
in Custom Code of Update Request section:
if (response && response.ok) {
notifySuccess(['Test command', 'Success']);
locationService.reload();
} else {
notifyError(['Test command', 'Error: ' + context.panel.response.headers.get('errmsg')]);
}
Result: