Bug 922759 - Return numeric error codes

If a basket call fails, return a numeric error code to indicate exactly which error happened, in addition to the text error message.