Fix #38 400-level errors

This isn't really a fix yet, but I've added tests for 400 and 404 errors to verify that the plugin works as expected with current dependencies.