FirebaseArrayIndexError interface
Stay organized with collections
Save and categorize content based on your preferences.
Composite type which includes both a FirebaseError
object and an index which can be used to get the errored item.
Signature:
export interface FirebaseArrayIndexError
Properties
Property |
Type |
Description |
error |
FirebaseError |
The error object. |
index |
number |
The index of the errored item within the original array passed as part of the called API method. |
FirebaseArrayIndexError.error
The error object.
Signature:
error: FirebaseError;
FirebaseArrayIndexError.index
The index of the errored item within the original array passed as part of the called API method.
Signature:
index: number;
Example
var registrationTokens = [token1, token2, token3];
admin.messaging().subscribeToTopic(registrationTokens, 'topic-name')
.then(function(response) {
if (response.failureCount > 0) {
console.log("Following devices unsucessfully subscribed to topic:");
response.errors.forEach(function(error) {
var invalidToken = registrationTokens[error.index];
console.log(invalidToken, error.error);
});
} else {
console.log("All devices successfully subscribed to topic:", response);
}
})
.catch(function(error) {
console.log("Error subscribing to topic:", error);
});
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-29 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2022-07-29 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-29 UTC."]]