TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
983 stars 309 forks source link

Event error payloads are not shown #1963

Closed johanstokking closed 4 years ago

johanstokking commented 4 years ago

Summary

Event error payloads are not shown

Steps to Reproduce

  1. Subscribe to gateway or application events in the Console
  2. Observe failure or packet drop events; they are not shown
  3. Subscribe to the same events in CLI; they are shown

What do you see now?

Console doesn't show error payloads:

Screenshot 2020-02-07 at 13 32 10

What do you want to see instead?

Error payloads, like CLI:

{
  "name": "gs.up.drop",
  "time": "2020-02-07T12:30:40.588851469Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "kerlink-ifemtocell",
        "eui": "7276FF003903007D"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
    "namespace": "pkg/gatewayserver",
    "name": "host_handle",
    "message_format": "host `{host}` failed to handle message",
    "attributes": {
        "host": "cluster"
      },
    "cause": {
      "namespace": "pkg/networkserver",
      "name": "device_not_found",
      "message_format": "device not found",
      "correlation_id": "df971dc6e7c5402596576816401ade98",
      "code": 5
    },
    "code": 5
  },
  ...
}

Environment

Console

How do you propose to implement this?

Can you do this yourself and submit a Pull Request?

Can review

pgalic96 commented 4 years ago

@johanstokking Does this entail also non uplink/downlink related event errors (such as failed link, failed pubsub etc.)?

htdvisser commented 4 years ago

This concerns all events with a "data" object that has "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails"