Skip to content

Instantly share code, notes, and snippets.

@kisielk
Created May 23, 2012 23:00
Show Gist options
  • Save kisielk/2778374 to your computer and use it in GitHub Desktop.
Save kisielk/2778374 to your computer and use it in GitHub Desktop.
Function for returning a URL to access an error sent to sentry via raven
def error_url(dsn, error_id):
import urlparse
search_base = urlparse.urlsplit(dsn)
search_url = search_base._replace(netloc=search_base.netloc.split('@')[1],
query='q={0}'.format(error_id),
path=search_base.path + '/search')
return search_url.geturl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment