Skip to content

healthcheck Failed for succesful host request #195

@brunolnetto

Description

@brunolnetto

Hi,

I develop in NodeJS. I would like to assign the /healthcheck on status-monitor initialization. The library provides a clear way to achieve it. However, even though I follow the given instructions, the route /status still gives the response "FAILED", even though the app is healthy. The healthCheck controller as well as library import and router are below.

import express from 'express';
export const router = express.Router();

export const healthCheck = async (req, res, next) => {
  log('debug', 'healthCheck controller called');

  res.status = 200;
  
  res.send({
    message: 'Sappio server running',
    version: pkg.version,
  })
}

router.get(
  '/healthcheck', 
  healthCheck
);

Do you know the reason for this non-working scenario?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions