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
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...