-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Trigger Error mediator #2266
Conversation
Add Trigger Error mediator <triggererror type="string" (errorMessage="string" | expression="expression")/>
3521103
to
bf80787
Compare
* Creates a trigger error mediator through the supplied XML configuration | ||
* <p/> | ||
* <pre> | ||
* <triggererror type="string" (errorMessage="string" | expression="expression")/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having two attributes for literal and expression, is it possible to have a Value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean the following syntax
<throwError type="string">(value | expression)</ throwError>
or
<throwError type="string" errorMessage="value" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<throwError type="string" errorMessage="value" />
looks better
private static final QName ATT_ERROR_MSG = new QName("errorMessage"); | ||
private static final QName ATT_TYPE = new QName("type"); | ||
private static final QName TRIGGER_ERROR_Q | ||
= new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "triggererror"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trigger-error
is more readable. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw-error is much better IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the following naming convention in mediators
<datamapper config="name" inputSchema="string" inputType="string" outputSchema="string" outputType="string"/>
<jsontransform [schema="string"]>
<dataServiceCall serviceName="data-service-name">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then throwError?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Address review comments
related to wso2/product-micro-integrator#3843 |
Purpose