Shouldn't the second argument be `message`, not `error` (then you can also get rid of the line 30)?

Besides that, LGTM.