Fix tests

The wrong errors were being passed through for long messages and the newline test was made invalid by a change to just strip `\n` characters from the message.