DOMO CustomApp - How get the the ErrorMessage of a domo.post?
Hi, I have built a Domo Custom App to call an AWS Lambda Function with domo.post.
There's no problem in managing the response when all goes fine.
But I haven't found how to extract the ErrorMessage from the response when it gives an error (HTTP errorcode: 400)
Can someone tell me where domo keep this information?
Thanks
Answers
-
@StefanoG who is sending the 400 error? Domo or AWS?
are you saying you're unable to capture the response from domo.post? b/c it seems to me you would just async / await and console.log the response.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Hi Jaew,
the 400 error came from AWS.
Iif use as client PostMan or the Python requests lib i got 400 as status_code
and the ErrorMessage, a specific message for every cause :
{
"ErrorMessage": .........
}
Why Domo.js don't throw the message but give me an generic "network error"
I wish detect if is a 429 or a 408 or is an application error because the request parameters are no corrects
0 -
... i didn't write domo.js :P
why don't you just send curl requests?
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Inside the Domo CustomApp I use domo.post to make REST Get and Post,
I don't even know if I can use curl in an the CustomApp JS script
0 -
@Stefano true. send a fetch or any other async method of querying APIs in JS.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
OK, thanks, as study case i will try to use curl, but i think that this insn't be the best solution to make REST call.
I hope that in a next version domo.js add a better handling of HTTP errors and return to the caller the status_code and the errormessage that it catchs
0 -
I get a the message.
@StefanoG in your devtools network request can you see more information? Can you see the actual error message?
When I do a domo request the promise rejects and I get the error message:
**Say "Thanks" by clicking the "heart" in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Hi n8isjack,
Is in the devtools network i see the errormessage
But in the console i see
where the code of app.js for the request is:
let aws_cf_url = `${CONFIG_DATA.AwsLambdaURL}` const options = {contentType: "application/json"} domo.post(aws_cf_url, req_body, options).then((ext_result) => { console.debug("ext_result: " + JSON.stringify(ext_result)) ... ... ... }).catch((error) => { console.error("->" + error.toString()) }) The error var is empty!!! There is a way to access at errormessage in the app.js code? Thanks
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive