Add error codes to basket client.

Use error code for invalid email instead of looking for a message.