Error Code: BODY_NOT_A_STRING_FROM_FUNCTION
The function returned a non-string body. This is a function error.
Reference
Table of Contents
- Error Overview
- Troubleshooting Steps
Error Overview
The BODY_NOT_A_STRING_FROM_FUNCTION error occurs when a function returns a body that is not a string. Functions are expected to return a string body to ensure proper processing and execution.
Troubleshooting Steps
1. Check Function Return Type
- Ensure the function is structured to return a string.
- If the function is returning a different data type, modify it to return a string using
JSON.stringify()if necessary.
2. Review Function Code
- Inspect the function code for any logic that might cause a non-string value to be returned.
3. Check Data Types
- If the function processes input data or retrieves data from external sources, ensure the data is correctly converted to a string before being returned.
4. Review Function Logs
- Check the function logs for any errors or warnings indicating why a non-string value is being returned.
Error Codes
- 502:
BODY_NOT_A_STRING_FROM_FUNCTION - Previous Error Codes
- Next Error Codes
Last Updated
July 24, 2024
Not what you were looking for? Try filtering the errors by tag, code, or name on the Error Codes page.