airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saminda Wijeratne <>
Subject Conveying Errors through the Thrift API
Date Thu, 24 Apr 2014 07:26:05 GMT
During an offline discussion related to the JIRA[1], it was made clear that
in an event of an exception at server side due to improper/invalid client
requests, the client should get back a proper error message which can be
programmed against. Two options were discussed,

   1. Define exceptions in the thrift data model for each and every error
   that can encounter and use them in the Thrift API
   2. Define a generic exception in the thrift data model which will have
   tagged data identifying the exception

We felt that while option 1 is ideal for the requirement it is also
unmanageable for both client and server if more and more exception types
needs to be introduced over time. Option 2 (while not a conventional way of
handling error) can circumvent this inconvenience by introducing a thrift
function to retrieve exact static error details (which can be updated at
the server side without needing to change the thrift model) based on the
tagged data.



View raw message