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

Add ability to use third party error tracking software for expressjs #118

Merged
merged 2 commits into from Dec 19, 2018
Merged

Add ability to use third party error tracking software for expressjs #118

merged 2 commits into from Dec 19, 2018

Conversation

dominathan
Copy link
Collaborator

Added a config property that looks like so. All error handlers (sentry, rollbar, etc.) need their error handler to be injected before all other error handling software. This code sets it if supplied by the user.

	errorTracking: {
		requestHandler: Sentry.Handlers.requestHandler,
		errorHandler: Sentry.Handlers.errorHandler
	}

@Robert-W
Copy link
Contributor

This looks pretty good to me. I like the idea of allowing people to be able to inject their own middleware to support more custom behaviors. @jonterrylee Let me know what you think but I am good with merging this in.

Once we do, I want to add this as another item on #119, this would be something useful to document and looks like it simply accepts any function that returns valid express middleware. We may need to think about any warnings, such as not calling next and breaking the chain of middleware (if they do this and don't return an operation outcome for an error, their implementation may no longer be conformant). I don't think we need to code anything around this, rather just mention it in our wiki.

@Robert-W Robert-W added this to To do in NPM Milestone Dec 18, 2018
@Robert-W Robert-W moved this from To do to In progress in NPM Milestone Dec 18, 2018
@Robert-W Robert-W merged commit eafa222 into bluehalo:develop Dec 19, 2018
@Robert-W Robert-W moved this from In progress to Done in NPM Milestone Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
NPM Milestone
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants