Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from
- 0
- Self Hosted
- Functions
I'm getting the following error very frequently now:
Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500
The whole is in the try-and-catch block where in catch I'm returning json response with a 500 status code.
Could you post your code, leave out anything not important to the question at hand
export const errorRes = (
res: any, error: any, message: string, code: number) => {
error(message);
return res.json(
{success: false, error: message},
code
)
};
export default async ({req, res, log, error}: Context) => {
let doc: string | null = null;
let client;
try {
if (
!process.env["APPWRITE_FUNCTION_API_ENDPOINT"] ||
!process.env["APPWRITE_API_KEY"] ||
!process.env["APPWRITE_FUNCTION_PROJECT_ID"]
) {
return errorRes(res, error, 'ENV Variables missing.', 500);
}
/* --------------------- */
// Do operations
/* --------------------- */
return res.json({
success: true,
file_id: uploadedFile.$id,
});
} catch (err: unknown) {
if (err instanceof Error) {
error(err.stack);
}
return errorRes(res, error, 'Something went wrong internally. Message: ' + err, 500);
}
};
Recommended threads
- Having issues with login via CLI
``` ~/appwrite appwrite login --endpoint https://localhost/v1 --verbose ? Enter your email myvalidemai...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...