I had this when passing a string with a newline character into the header object for example:
const myString = 'this is a string \nand this is a new line';
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
'subscriptionId': myString
}