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

IPC error handling #742

Closed
1 of 2 tasks
kirrg001 opened this issue May 31, 2018 · 0 comments · Fixed by #744
Closed
1 of 2 tasks

IPC error handling #742

kirrg001 opened this issue May 31, 2018 · 0 comments · Fixed by #744
Assignees
Labels

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented May 31, 2018

This issue is a

  • Bug Report
  • Feature Request

Summary

There is something wrong when receiving an error from Ghost. I was testing with the local process manager only - not sure if this affects production as well. It's important to fix this error, because it's super hard for the user to know what's wrong if we ship dynamic routing, but the error is not forwarded correctly e.g. you change the routing file, but you received an error.

  1. Ghost sends an IPC message e.g. {started: false, error: 'a message'}
  2. The message is received here. It forwards only the message, no object.
  3. The target process (which is in this case the local process manager) receives the error here. And here is the problem: this function tries to access error.message.

I guess we can simply change

instance.process.error(message.error);

to

instance.process.error({message:message.error, started: message.started});

Steps to Reproduce (for a bug report)

  1. Throw an error with the local process manager.
  2. See that the error log in the CLI does not show the error message.

Technical details (for a bug report)

  • OS: Mac
  • Node Version: 8
  • Ghost-CLI Version: Latest
  • Environment: development
  • Command: ghost start

@acburdine Any opinion on that? Thanks!

@kirrg001 kirrg001 added the bug label May 31, 2018
kirrg001 added a commit to kirrg001/Ghost-CLI that referenced this issue Jun 3, 2018
closes TryGhost#742

- the target process manager has not received the correct error format
@kirrg001 kirrg001 self-assigned this Jun 3, 2018
acburdine pushed a commit that referenced this issue Jun 4, 2018
closes #742

- the target process manager has not received the correct error format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant