Fixing handler for errors on non-GET requests