Fix test failure: HMAC key was not properly encoded in error responses

Fixes issues with tests failing. Doesn't seems to break anything else.