Constraints: - Like HTTP request methods, rest API methods are also asynchronous. To wait for the promise, use await. Listening for promises using .then() is not supported.
- To get the API error, use try-catch. In case parameters are missing or because of other reasons, the API call fails, it will be available as an error in the catch section.
|