I'm trying to understand how I can get the raw object of the error in the try/catch block like so:
try {
} catch (error) {
console.log(error);
}
The above is logging the stack instead of the raw object.
I'm asking this out of curiosity, because at first, I tried to print the message and not the stack and only by searching the web I could find this
object has property of message
.