improved console.trace error in send-error.js to console.trace all errors, except for jsonProblemErrors < 500
rewrote the code from previous commit a bit so it's easier to understand