UNPKG

@shopify/shopify-app-express

Version:

Shopify Express Middleware - to simplify the building of Shopify Apps with Express

18 lines (16 loc) 509 B
async function process({ req, res, api, config, }) { try { await api.webhooks.process({ rawBody: req.body, rawRequest: req, rawResponse: res, }); config.logger.info('Webhook processed, returned status code 200'); } catch (error) { config.logger.error(`Failed to process webhook: ${error}`); // The library will respond even if the handler throws an error } } export { process }; //# sourceMappingURL=process.mjs.map