running code that has a body similar to the one below, the code executes fine, but the connection doesn't close once it's finished, I've looked at node process doesn't exit after firebase once but I'm looking for something that won't give me an error every time that the function is used in the serverless framework.
const firebase = require('firebase-admin');
return new Promise((resolve, reject) => {
var message = {
notification: {
title: `**`,
body: `**`
},
condition: `**`
};
firebase.messaging().send(message).then((response) => {
resolve(response);
})
.catch((error) => {
reject(error);
});
});
How can I get it to exit this process without creating a serverless error?