Handle user not found in assistant

This commit is contained in:
Cadence Ember
2020-04-08 15:11:49 +12:00
parent b2b84c0663
commit 99213216f7
4 changed files with 23 additions and 3 deletions

View File

@@ -65,6 +65,14 @@ module.exports = [
message: "Rate limited by Instagram.",
identifier: "RATE_LIMITED"
})
} else if (error === constants.symbols.NOT_FOUND || error === constants.symbols.ENDPOINT_OVERRIDDEN) {
return reply(404, {
status: "fail",
version: "1.0",
generatedAt: Date.now(),
message: "User not found.",
identifier: "NOT_FOUND"
})
} else {
throw error
}