diff --git a/packages/fxa-auth-server/lib/subhub/client.js b/packages/fxa-auth-server/lib/subhub/client.js index c53821adb0..cdebfd0ffd 100644 --- a/packages/fxa-auth-server/lib/subhub/client.js +++ b/packages/fxa-auth-server/lib/subhub/client.js @@ -188,10 +188,7 @@ module.exports = function(log, config) { } catch (err) { if (err.statusCode === 404) { log.error('subhub.listSubscriptions.1', { uid, err }); - // TODO: update with subhub listSubscriptions error response for invalid uid - if (err.message === 'invalid uid') { - throw error.unknownCustomer(uid); - } + throw error.unknownCustomer(uid); } throw err; } diff --git a/packages/fxa-auth-server/test/local/subhub/client.js b/packages/fxa-auth-server/test/local/subhub/client.js index 37adbb526a..627c2af242 100644 --- a/packages/fxa-auth-server/test/local/subhub/client.js +++ b/packages/fxa-auth-server/test/local/subhub/client.js @@ -154,7 +154,7 @@ describe('subhub client', () => { it('should throw on unknown user', async () => { mockServer .get(`/v1/customer/${UID}/subscriptions`) - .reply(404, { message: 'invalid uid' }); + .reply(404, { message: 'Customer does not exist.' }); const { log, subhub } = makeSubject(); try { await subhub.listSubscriptions(UID);