Fix supertest usage to correctly throw errors.

Fix supertest usage and fix a test to match the behaviour (which I understand but don't like much).