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

fix(miiorobot): Fix ERR_HTTP_HEADERS_SENT exception #1501

Merged
merged 1 commit into from
May 13, 2022

Conversation

004helix
Copy link
Contributor

Type of change

Type A:

  • Bug fix (non-breaking change which fixes an issue)
  • UI Feature
  • Refactor/Code Cleanup
  • Docs
  • Capability implementation for existing core capability
  • New robot implementation

Description (Type A)

Fix unhandled exception on miio_client start/restart

[2022-05-12T21:31:35.232Z] [ERROR] Unhandled WebServer Error Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:377:5)
    at ServerResponse.setHeader (node:_http_outgoing:576:11)
    at ServerResponse.header (/snapshot/Valetudo/node_modules/express/lib/response.js:776:10)
    at ServerResponse.send (/snapshot/Valetudo/node_modules/express/lib/response.js:170:12)
    at ServerResponse.json (/snapshot/Valetudo/node_modules/express/lib/response.js:267:15)
    at ServerResponse.send (/snapshot/Valetudo/node_modules/express/lib/response.js:158:21)
    at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:304:29
    at Layer.handle [as handle_request] (/snapshot/Valetudo/node_modules/express/lib/router/layer.js:95:5)
    at next (/snapshot/Valetudo/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/snapshot/Valetudo/node_modules/express/lib/router/route.js:112:3) {
  code: 'ERR_HTTP_HEADERS_SENT'
}

@Hypfer Hypfer merged commit a47f3b9 into Hypfer:master May 13, 2022
@004helix 004helix deleted the err-headers-sent branch May 13, 2022 11:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants