const codeengine = require('codeengine');
async function handleRequest(
method,
url,
body = null,
headers = null,
contentType = null,
) {
try {
return await codeengine.sendRequest(
method,
url,
body,
headers,
contentType,
);
} catch (error) {
console.error(`Error with ${method} request to ${url}:`, error);
throw error;
}
}