For example I just got this error:
{ Error: There was an error sending your trade offer. We were unable to contact the game's item server. The game's item server may be down or Steam may be experiencing temporary connectivity issues. Please try again later.
at Object.exports.makeAnError (C:\Some\Boring\Route\node_modules\steam-tradeoffer-manager\lib\helpers.js:17:12)
at SteamCommunity.manager._community.httpRequestPost...
How do I get just the "There was an error sending your trade offer..." part so I can later send it back to the client?
It’s in the message
property.
let error = new Error('example');
console.log(error.message);
See also the string representation of errors per ECMAScript.
My err.message
is null. I used err.toString()
It's saved my ass.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With