We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41b4240 commit 95ced68Copy full SHA for 95ced68
packages/functions/src/api/service.ts
@@ -42,7 +42,7 @@ interface HttpResponse {
42
*
43
* @param millis Number of milliseconds to wait before rejecting.
44
*/
45
-function delay(millis): Promise<Response> {
+function failAfter(millis): Promise<HttpResponse> {
46
return new Promise((_, reject) => {
47
const error = new HttpsErrorImpl('deadline-exceeded', 'deadline-exceeded');
48
setTimeout(() => reject(error), millis);
@@ -183,7 +183,7 @@ export class Service implements FirebaseFunctions {
183
184
const response = await Promise.race([
185
this.postJSON(url, body, headers),
186
- delay(timeout)
+ failAfter(timeout)
187
]);
188
189
// Check for an error status, regardless of http status.
0 commit comments