Class: AiravataClientException
- Inherits:
-
Thrift::Exception
- Object
- Thrift::Exception
- AiravataClientException
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/airavata_errors_types.rb
Overview
This exception is thrown by Airavata Services when a call fails as a result of a problem that a client may be able to resolve. For example, if the user attempts to execute an application on a resource gateway does not have access to.
This exception would not be used for internal system errors that do not reflect user actions, but rather reflect a problem within the service that the client cannot resolve.
airavataErrorType: The message type indicating the error that occurred.
must be one of the values of AiravataErrorType.
parameter: If the error applied to a particular input parameter, this will
indicate which parameter.
Constant Summary collapse
- AIRAVATAERRORTYPE =
1
- PARAMETER =
2
- FIELDS =
{ AIRAVATAERRORTYPE => {:type => ::Thrift::Types::I32, :name => 'airavataErrorType', :enum_class => ::AiravataErrorType}, PARAMETER => {:type => ::Thrift::Types::STRING, :name => 'parameter', :optional => true} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
218 |
# File 'lib/airavata_errors_types.rb', line 218 def struct_fields; FIELDS; end |
#validate ⇒ Object
220 221 222 223 224 225 |
# File 'lib/airavata_errors_types.rb', line 220 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field airavataErrorType is unset!') unless @airavataErrorType unless @airavataErrorType.nil? || ::AiravataErrorType::VALID_VALUES.include?(@airavataErrorType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field airavataErrorType!') end end |