NebraLtd / hm-pktfwd

Helium Miner Packet Forwarder
https://nebra.io/hnt
MIT License
12 stars 24 forks source link

CalledProcessError: Command '['/opt/sx1302/chip_id', '-d', '/dev/spidev1.2']' returned non-zero exit status 1. #79

Closed sentry-io[bot] closed 2 years ago

sentry-io[bot] commented 2 years ago

Sentry Issue: HM-PKTFWD-4

CalledProcessError: Command '['/opt/sx1302/chip_id', '-d', '/dev/spidev1.2']' returned non-zero exit status 1.
  File "/opt/pktfwd/utils.py", line 70, in is_concentrator_sx1302
    subprocess.run(util_chip_id_cmd, capture_output=True,
  File "subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,

SX1301 detected. util_chip_id script exited with error.
marvinmarnold commented 2 years ago

The relevant code here already looks like it is already being handled. @vpetersson any ideas why Sentry would still be flagging it?

vpetersson commented 2 years ago

We'll, Sentry will catch all exceptions. You need to add a specific decorator to suppress sentry if that is expected.

marvinmarnold commented 2 years ago

We'll, Sentry will catch all exceptions. You need to add a specific decorator to suppress sentry if that is expected.

This part of the documentation says that only uncaught exceptions get captured by Sentry. We also aren't generally adding decorators to exceptions throughout the code so I'm surprised there aren't way more noisy codepaths generally. I was thinking it was something to do with the usage of subprocess.