Switch to using errbit for error handling

To be merged along with https://github.gds/gds/alphagov-deployment/pull/655