Why does my function return a 204 response when I call it from Postman or curl?

Validated on 14 Apr 2023 • Last edited on 14 Apr 2023

If your function does not return a response object, you’ll get a 204 No Content response when using Postman, curl and other tools. This can be confusing if you’ve been prototyping your function using the control panel, where you can see the logs (using console.log() in JavaScript, for example) in the Logs tab of your function’s namespace.

If you want this logged data to be returned as a response to HTTP requests instead, you must return a proper response object from your handler function. See the Parameters and Responses documentation for more details.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.