Why am I encountering an error with this code snippet?
deleteUser(userId: string) {
this.dataService.deleteUser(userId).subscribe((response: string) => {
console.log(response);
});
}
"SyntaxError: Unexpected token f in JSON at position 1 at JSON.parse () at XMLHttpRequest.onLoad (https://localhost:5001/vendor.js:34968:51) at ZoneDelegate.invokeTask (https://localhost:5001/polyfills.js:412:35) at Object.onInvokeTask (https://localhost:5001/vendor.js:72879:33) at ZoneDelegate.invokeTask (https://localhost:5001/polyfills.js:411:40) at Zone.runTask (https://localhost:5001/polyfills.js:180:51) at ZoneTask.invokeTask [as invoke] (https://localhost:5001/polyfills.js:493:38) at invokeTask (https://localhost:5001/polyfills.js:1634:18) at XMLHttpRequest.globalZoneAwareCallback (https://localhost:5001/polyfills.js:1671:25)"
The response received is a plain string value and has a status of 200.
https://i.sstatic.net/t95z2.png
https://i.sstatic.net/1dCgo.png
What could I have overlooked or missed in my implementation?