From 4900bf320020b5be8f6943b9be33e0868657c7ac Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 18 Sep 2021 21:36:46 +0100 Subject: [PATCH] :sparkles: Adds a cloud function for unsupported endpoints --- services/serverless-functions/not-supported.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 services/serverless-functions/not-supported.js diff --git a/services/serverless-functions/not-supported.js b/services/serverless-functions/not-supported.js new file mode 100644 index 00000000..255d5d94 --- /dev/null +++ b/services/serverless-functions/not-supported.js @@ -0,0 +1,8 @@ +/* A Netlify cloud function to return a message endpoints that are not available */ +exports.handler = async () => ({ + statusCode: 200, + body: JSON.stringify({ + success: false, + error: 'This action is not supported on Netlify', + }), +});