Error message from filter array - workflow

So I have tried to get the error message from a filter array in a logic app workflow, this is what i have tried:
#body('Filter_array')['error']
#actions('Filter_array')['outputs']['body']['error']
Am I missing something or doing something wrong here?
Thanks.
UPDATE:
It says: "cannot be evaluated because property 'error' cannot be selected. ".
But i can clearly see the "error" in the body object in the output.

Ok so i managed to figure it out, i missed the fact that the array doesnt give me a single object as i thought i set it up to. so the solution was this:
#string(actions('Filter_array')['outputs']['body'][0]['error'])
Thanks for the help! :)

Can you try with #actions('Filter_array')['error'] ?
You have to distinguish 2 types of errors.
First error can occur during execution of your connector. Eg. The filter did not match. In this case, the connector executed and returns an output with an error-message.
Second error is a runtime error that can occur on the connector. For example if the input of your connector is invalid and the executing of the connector can't be triggered. In this case, the connector does not generate an output or result. In that case, you have to catch the exception with #actions('Filter_array')['error']

Related

Why is Gatling failing on a valid jsonpath?

I have the following .check on my returned body: (I changed the values for security reasons but the structure is the same)
.exec(http("Get ids")
.post("GetIds")
.body(ElFileBody("json/getIds.json")).asJson
.check(jsonPath("$...Types..[?(#.Type == 'web')].id").findAll.saveAs("IDLlist"))
But the transaction fails with "Gettting findAll.exists extraction crashed: end of input expected when trying to extract values from a returned body"
Gatling prints the body of the failed transaction, when I take the exact body that the transaction had just failed on to http://jsonpath.com/ and
evaluate the jsonpath that had just failed, I get good results with no issues. This means that the returned body is correct and that the jsonpath is also correct.
What is the issue then?
Thanks to Stephane from the Gatling forum, I found that $..Files[?(#.Format == 'DASH_Web')].URL is correct works instead of the variation that I had.
Since http://jsonpath.com/ was able to extract the correct path using my original syntax, I think its important to note that Gatling jsonpath is much more conservative in its syntax.
It seems your JSON path syntax is wrong --> "$...Types..[?(#.Type == 'web')].id"
Try using JSONPath Online Evaluator -- http://jsonpath.com/ to find correct json syntax

createInstantRoom throwing error in strophe.muc.js

I'm trying to create muc room using createInstantRoom method in strophe.muc.js, but its throwing error. can anyone plese tell me what is the format of room name given as input to createInstantRoom method
I tried this:
this.globalConnection.muc.createInstantRoom('testGroup#conference.localhost/879FKQVK0NZVMWRYQ8#localhost', this.onSuccess, this.onFailure);
This is the error call backfunction response:
…
I don't know about strophe, but this sounds wrong:
testGroup#conference.localhost/879FKQVK0NZVMWRYQ8#localhost
If that argument is the room JID, then it's probably better something like:
testGroup#conference.localhost

Talend component tPivotToColumnsDelimited generates error "The method parseObject(String) is undefined for the type Object"

I am using the component tPivotToColumnsDelimited in Talend 6.1.1. When I try to run the job I get the error message "The method parseObject(String) is undefined for the type Object".
In code view I can see the error relates to this line of Talend-generated code:
sumtPivotToColumnsDelimited_1 = Object.parseObject(row3.Amount + "")
As you can see from the process flow above, the data comes from an SQL query. The schema flowing into the tPivotToColumnsDelimited looks like this:
The tPivotToColumnsDelimited component settings look like this:
Any suggestion how to fix it?
Its clear that Talend cannot parse an Object typed variable, You need to change the type of column Ammount to other type like int, float.

How to get the sql state from libpq?

I program with libpq.so. I want to get the error code which is called sql state in SQL Standard.How should I get this in my c code?
The obvious Google search for libpq get sqlstate finds the libpq-exec documentation. Searching that for SQLSTATE finds PG_DIAG_SQLSTATE in the PQresultErrorField section.
Thus, you can see that you can call PQresultErrorField(thePgResult, PG_DIAG_SQLSTATE) to get the SQLSTATE.
This is just addition I can not leave in form of comment due to reputation reasons.
Note that you can not portably get SQLSTATE for errors that can occur during PQconnectdb. In theory, you can read pg_conn (internal struct) field last_sqlstate which contains correct value.
For example, if you try to connect with invalid login/password, it will give you 28P01. For wrong database it will contain 3D000.
I wish they defined publically available getter for this field.
You can check this one as well:
libpq: How to get the error code after a failed PGconn connection

how to use divide() method in jasper reports?

Im using iReport1.3.3 tool to create pdf and xls template ..
My problem is for the below expression,
($V{strloanNo}).divide($V{loanCalculation})
i need to divide both the variables but i am not getting expected result. it is displaying "null" value .
any idea guys?
$V{x}.divide( $V{y} )
This works for me.
It looks like your variables are Null.
Make sure to set the Initial Value Expression in the variable's properties.
I set both of mine to below.
new java.math.BigDecimal(10.0)
Guess you can try this out -
$V{strloanNo}.floatValue()/$V{loanCalculation}.floatValue()
As it was discussed
here, you can check this:
$F{Attribute_a}.divide($F{Attribute_b}, new MathContext(100))
If your division results in a non-terminating decimal then an exception is thrown. So you scale simply it to something reasonable and exception be gone.
$F{Attribute_a}.divide($F{Attribute_b})
and class type should be java.math.BigDecimal
if attribute b is zero, please put the condition