stevenyvr987 / overdrive-evergreen-opac

Automatically exported from code.google.com/p/overdrive-evergreen-opac
0 stars 0 forks source link

Handle errors arising from placing a hold or checking out an item #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is a complex set of possible errors that could occur during these two 
basic transactions. Currently, such errors are 'consumed', ie, do not show on 
the screen.

Original issue reported on code.google.com by steven3...@gmail.com on 1 Jul 2014 at 6:37

GoogleCodeExporter commented 9 years ago
For example, if one tries to place a hold that is over the 5-hold limit, the 
request gneerates an error code 400, statusText 'Bad Request', and a 
responseText of

errorCode: "PatronExceededHoldLimit"
message: "Patron cannot place any more holds, already has maximum holds placed."
token: "82360964-ff1d-4e1b-b0f8-6252fccb70bd"

Another possible responseText is

errorCode: "InputValidationError"
message: "Invalid email address format"
token: "ef88eac4-2adf-47e8-a382-e76c899619ec"

Original comment by steven3...@gmail.com on 4 Aug 2014 at 9:36

GoogleCodeExporter commented 9 years ago
The two possible hold errors are handled. The message property of the reply is 
plucked out and presented in the body of the dialogue box.

Don't know whether the same reply format is used in checkouts or other actions, 
since it is not documented.

Original comment by steven3...@gmail.com on 5 Aug 2014 at 8:21

GoogleCodeExporter commented 9 years ago
The same reply format is used for checkouts. We can verify by trying to select 
the format of an item that has more than one format. By not selecting any 
format, we can simulate an invalid input format.

Original comment by steven3...@gmail.com on 5 Aug 2014 at 8:34