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

Commit a1d5e96

Browse files
author
Alan Shaw
committed
fix: better error message for pubsub message parse
1 parent cb16982 commit a1d5e96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pubsub/subscribe.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const ndjson = require('iterable-ndjson')
4+
const explain = require('explain-error')
45
const { objectToQuery } = require('../lib/querystring')
56
const configure = require('../lib/configure')
67
const { ok, toIterable } = require('../lib/fetch')
@@ -42,7 +43,7 @@ module.exports = configure(({ fetch, apiUrl, apiPath, headers }) => {
4243
topicIDs: msg.topicIDs
4344
})
4445
} catch (err) {
45-
onError(err, false) // Not fatal
46+
onError(explain(err, 'Failed to parse pubsub message'), false) // Not fatal
4647
}
4748
}
4849
} catch (err) {

0 commit comments

Comments
 (0)