Skip to main content
Skip table of contents

Error Reporting Healthcheck

Error Reporting Healthcheck should be the first directive to implement. Why?

  1. You can trigger it by clicking a button and see feedback in real time.

  2. It’s quite handy to receive real time feedback with error details when you implement directives.
    By implementing this directive you’ll understand how to leverage existing tools and help yourself when the integration your’re developing crashes.

  3. With the directive implement we can verify for each client that error-reporting works and that we’ll be notified on crashes

Before implementing a directive implement the https://revoffers.atlassian.net/wiki/spaces/KMA/pages/1637613663 processing loop.

Expected Payload:

CODE
{
  "directives": [
    {
      "args": {},
      "directive": "simulate_error_reporting_health_check",
      "id": "19ea7e1b-c8f7-4c82-b9de-32035675fbfa"
    }
  ]
}

Expected Response:

CODE
{
  "results": [
    {
      "details": {
        "message": "[TEST] simulate_error_reporting_health_check",
        "trace": [
          "lib/shopify_app_web/controllers/oneo_to_merchant_controller.ex:61",
          "lib/shopify_app_web/controllers/oneo_to_merchant_controller.ex:33",
          "lib/phoenix/router.ex:354"
        ]
      },
      "source_directive": "simulate_error_reporting_health_check",
      "source_id": "19ea7e1b-c8f7-4c82-b9de-32035675fbfa",
      "status": "error"
    }
  ]
}

Reference Implementation (Elixir):

ELIXIR
  defp directive(_store, "simulate_error_reporting_health_check", _args) do
    raise RuntimeError, message: "[TEST] simulate_error_reporting_health_check"
  end

Once Katalys receives a correctly structured error response it will:

  1. Report to internal error collector tool

  2. Notify Katalys engineers


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.