3 min read
Automation Trends: Top APIs to use in 2023
An application programming interface is all around us and will be even more in the trend of automation in 2023. They are used to access data that...
2 min read
Mathieu Rasse
:
Dec 26, 2022 11:56:11 AM
You may encounter errors while creating your automation with Meta API: that’s part of any coding activities (yes, you’re a coder when you use Meta API!) and that’s okay.
Let's review the most common errors and how you can fix them.
Every programming language is based on some data format. For JavaScript (which Meta API is based on), you have this primary data types:
If you try to manipulate a number as a string, it’s like putting a square peg in a round hole: that’ll crash at some point or create an unexpected behavior.
Check your data and see if it’s the right type. It’s common to see numbers return as a string by APIs for example.
Example in Stripe’s API where a number is return both as a number and a string
If you need to transform the data format, you have many functions to do this (like parseInt() to transform a string to an integer). Check the MDN documentation to have all existing functions.
APIs can be wild! Even if they respond to the same “standardization”, every developer implements them in their own way.
The first thing to do is to check the HTTP error to identify what is the cause of the error. Here some examples:
You already have an integration inside Meta API of help messages based on HTTP error code. Check then inside the console to know what you have to do to fix it.
First, look for syntax errors and check if you have missed a character or miss typed an object property.
If you didn’t solve it, try to type the function you try to achieve or make on search on platform like StackOverflow to see examples.
You can also use MDN docs to check the methods you want to use.
The first thing to check is you source endpoint: will this endpoint give you all the data you want?
Check the response schema or the original documentation to verify if you’ll find the data you want.
Then, see inside the debugger if you find the data you want.
If you want to extract and transform data, you can use the Function block to achieve this
Debugging is now integrated inside Lumo, our low-code interface. You can check data coming from any block to verify if you try to access unavailable data or to have the original format.
Inside our code editor (or a Function Block) : you can use the console.log()
function to log an object or a value inside the Console panel.
3 min read
An application programming interface is all around us and will be even more in the trend of automation in 2023. They are used to access data that...
2 min read
You may encounter errors while creating your automation with Meta API: that’s part of any coding activities (yes, you’re a coder when you use Meta...
4 min read
Making questionnaires can be very useful for your company. Indeed, there are many types of surveys that allow you to get precious information. For...