Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor returns invalid response when REST API down #499

Closed
steven-sheehy opened this issue Jan 17, 2020 · 0 comments · Fixed by #503
Closed

Monitor returns invalid response when REST API down #499

steven-sheehy opened this issue Jan 17, 2020 · 0 comments · Fixed by #503
Assignees
Labels
bug Type: Something isn't working monitor Area: Monitoring and dashboard P1 regression
Milestone

Comments

@steven-sheehy
Copy link
Member

steven-sheehy commented Jan 17, 2020

Detailed Description
During testnet upgrade of REST API, the new monitor started returning a stacktrace instead of a JSON response.

Actual Behavior
Steps to reproduce the behavior:

  1. Stop REST API
  2. Go to http://monitor/api/v1/status
  3. Stacktrace in browser:
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'testResults' -> object with constructor 'Array'
    --- index 1 closes the circle
    at JSON.stringify (<anonymous>)
    at stringify (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/response.js:1123:12)
    at ServerResponse.json (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/response.js:260:14)
    at ServerResponse.send (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/response.js:158:21)
    at /opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/server.js:59:31
    at Layer.handle [as handle_request] (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/router/layer.js:95:5)
    at next (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/router/layer.js:95:5)
    at /opt/restapi/hedera-mirror-rest/monitoring/monitor_apis/node_modules/express/lib/router/index.js:281:22```

**Expected Behavior**
JSON output

**Environment:**
- Node: v12
- OS: Ubuntu 18.04
- Version: v1.5.1

**Additional Context**


@steven-sheehy steven-sheehy added bug Type: Something isn't working P1 regression monitor Area: Monitoring and dashboard labels Jan 17, 2020
@steven-sheehy steven-sheehy self-assigned this Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working monitor Area: Monitoring and dashboard P1 regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant