Skip to content
This repository was archived by the owner on Jan 17, 2022. It is now read-only.
This repository was archived by the owner on Jan 17, 2022. It is now read-only.

Log the pattern that is tried in case sigfox parsing fails #1

@francisdb

Description

@francisdb

We better throw an error like "Parsing sigfox message ${msg} using ${pattern} failed"

RangeError: index out of range
  File "buffer.js", line 613, in checkOffset
  File "buffer.js", line 637, in Buffer.readUIntBE
  File "/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/readers/readUInt.js", line 5, in Object.readUInt
    return buffer.readUIntBE(offset, length / 8);
  File "[as uint] (/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/node_modules/lodash/lodash.js", line 4606, in Object.wrapper
  File "/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/index.js", line 38, in null.<anonymous>
    obj[fields[0]] = types[fields[2]](fields[1] || l, fields[3], fields[4]);
  File "/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/node_modules/lodash/lodash.js", line 664, in arrayReduce
    accumulator = iteratee(accumulator, array[index], index, array);
  File "/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/node_modules/lodash/lodash.js", line 8727, in Function.reduce
    return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  File "/home/waylay/dashboard/node_modules/@waylay/sigfox-parser/index.js", line 31, in parseMessage
    return _.reduce(format.split(' '), (obj, value) => {
  File "/home/waylay/dashboard/controllers/api/webhook/sigfox.js", line 18, in module.exports.Resource.find.then.devices

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions