Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
fix: better error message for pubsub message parse
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Jul 9, 2019
1 parent cb16982 commit a1d5e96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pubsub/subscribe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const ndjson = require('iterable-ndjson')
const explain = require('explain-error')
const { objectToQuery } = require('../lib/querystring')
const configure = require('../lib/configure')
const { ok, toIterable } = require('../lib/fetch')
Expand Down Expand Up @@ -42,7 +43,7 @@ module.exports = configure(({ fetch, apiUrl, apiPath, headers }) => {
topicIDs: msg.topicIDs
})
} catch (err) {
onError(err, false) // Not fatal
onError(explain(err, 'Failed to parse pubsub message'), false) // Not fatal
}
}
} catch (err) {
Expand Down

0 comments on commit a1d5e96

Please sign in to comment.