Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Don't crash when HttpContext exists without a request #67

Merged
merged 1 commit into from
Feb 20, 2015

Conversation

JonAnders
Copy link

If we're logging an exception that originated in Application_Start of Global.asax, we will have an HttpContext without a request. Trying to access the Request property when there is no request will not just return null, it actually results in an HttpException with the message "Request is not available in this context". No exception is logged to Sentry.

With this fix, the exception is logged to Sentry, even if there is no request on HttpContext.

@asbjornu asbjornu merged commit 3ff75ff into getsentry:master Feb 20, 2015
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.

2 participants