Uploaded image for project: 'Network Observability'
  1. Network Observability
  2. NETOBSERV-1877

Introduce typed errors in TS/http errors

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Loki
    • None
    • Proactive Architecture
    • False
    • None
    • False

      Error handling in TS is currently quite hackish [1][2], with error type (such has "is it about Prom/Loki") being determined by text injection ... I guess we should do better. Current props "isLokiRelated" doesn't really mean what it says.

       

      PS: by "typed errors" we don't necessarily mean via strong typing... could be just an enum field; up to the implementer.

       

       [1]https://github.com/netobserv/network-observability-console-plugin/blob/96729c2e8b63e1f6ee134a385f8524eca688683a/web/src/components/drawer/netflow-traffic-drawer.tsx#L240 

       [2]https://github.com/netobserv/network-observability-console-plugin/blob/96729c2e8b63e1f6ee134a385f8524eca688683a/web/src/utils/errors.ts#L7

              Unassigned Unassigned
              jtakvori Joel Takvorian
              Amogh Rameshappa Devapura Amogh Rameshappa Devapura
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: