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.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive