Skip to content

Unhelpful error "Uncaught TypeError" #9

Open
@analytik

Description

@analytik

When I try to curl the scraper/metrics/, I get

<br />
<b>Fatal error</b>:  Uncaught TypeError: Return value of Ujamii\OpenMetrics\Sentry\SentryExporter::getJson() must be of the type array, null returned in /var/www/html/src/SentryExporter.php:108
Stack trace:
#0 /var/www/html/src/SentryExporter.php(98): Ujamii\OpenMetrics\Sentry\SentryExporter-&gt;getJson(Object(GuzzleHttp\Psr7\Response))
#1 /var/www/html/src/SentryExporter.php(55): Ujamii\OpenMetrics\Sentry\SentryExporter-&gt;getProjects()
#2 /var/www/html/metrics/index.php(7): Ujamii\OpenMetrics\Sentry\SentryExporter-&gt;run()
#3 {main}
  thrown in <b>/var/www/html/src/SentryExporter.php</b> on line <b>108</b><br />

To add to the confusion, there is nothing in the server log, and this returns http 200.

API token is configured, and the URL format seems correct. When I curl the Sentry API endpoint with the same token, I get a normal-seeming, valid JSON response.

Using the official docker image:

ujamii/prometheus-sentry-exporter latest 1a7d291064ac 9 months ago 523MB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions