Siebel Interactive Selling Transact Server Interface Reference > The Shopping Cart > The Quote List >

Error Handling

The server may return one of two errors during quote list processing. You can test for the occurrence of errors by using JSP at the beginning of the QuoteList template, and then handle them by displaying an alert message to the user with JavaScript. The alert message should give the user an idea of why the error occurred and the possible consequences of the error condition. The default code in the QuoteList.jsp template for handling these errors is:

<% if (quoteList.errorDeletedAnotherUserQuote()) { %>
alert("Sorry, you cannot delete a quote created by another user!");
<% } else if (quoteList.errorOccurred()) { %>
alert("An error occurred on the server while retrieving your list!\n Please try again or contact your system administrator.");
<% } %>

You can test the first error condition with the QuoteList API function errorDeletedAnotherUserQuote, a function which returns true or false. Transact only allows quotes to be deleted by their creator to simplify concurrent access. The call to quoteList.errorDeletedAnotherUserQuote() returns true if the user just attempted a delete from the quote list on a quote that the user does not own. Transact returns a message to the user that explains why the operation is disallowed.

The second error condition is more general and can be caused by any trappable but nonrecoverable error on the server side. A database error that prevents successful deletion or selection from one of the quote tables is the most frequent cause. The API function you use to detect that the QuoteList operation has thrown an error is the errorOccurred() function. The default handling for this error is to alert the user that an error occurred on the server and to instruct the user to try again.

 Siebel Interactive Selling Transact Server Interface Reference 
 Published: 18 April 2003