snippets-node icon indicating copy to clipboard operation
snippets-node copied to clipboard

Function execution took ****** ms, finished with status: 'connection error'

Open ethanfox opened this issue 8 years ago • 2 comments

This code gives me this error:

Function execution took 11879 ms, finished with status: 'connection error'

How can I fix this?

Code:

exports.businessUpdated = functions.firestore.document('businesses/{uid}').onCreate(event => {
// Get the note document
const note = event.data.data();

// Add an 'objectID' field which Algolia requires
note.objectID = event.params.noteId;

// Write to the algolia index
const index = client.initIndex(ALGOLIA_INDEX_NAME);
return index.saveObject(note);

 });

ethanfox avatar Mar 15 '18 01:03 ethanfox

i got same problem, have you solved it?

aryayudha avatar Mar 29 '18 08:03 aryayudha

@aryayudha is it possible you're trying to access an external service but are still using the free plan?

samtstern avatar Mar 29 '18 15:03 samtstern