Code

Opened 2 years ago

Closed 13 months ago

#17489 closed Bug (wontfix)

Errors low in the stack provide unhelpful text.

Reported by: issackelly Owned by: nobody
Component: Core (Other) Version: 1.4-alpha-1
Severity: Normal Keywords:
Cc: chomik Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I had an error in my cache configuration for a full-site cache setup.

Here are the relavent settings:

MIDDLEWARE_CLASSES = [

'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'pagination.middleware.PaginationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',

]
CACHES = {

'default': {

'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake'

}

}
CACHE_MIDDLEWARE_ALIAS = 'somethingelse'
CACHE_MIDDLEWARE_SECONDS = 90 * 60
CACHE_MIDDLEWARE_KEY_PREFIX = 'issackelly_com_mw'

With these settings I got a traceback in the runserver console, but the only thing that was displayed in the browser was the following:

"""A server error occurred. Please contact the administrator."""

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by chomik

  • Cc chomik added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

At the moment when this exception is raised there is no request object available. Traceback error page would have to be created by hand and returned bypassing normal request dispatching.

Creating response would involve complex exception handling and would prevent proper exception propagation.

It is safer to leave it as it is.

comment:2 Changed 13 months ago by aaugustin

  • Component changed from Uncategorized to Core (Other)

comment:3 Changed 13 months ago by aaugustin

  • Type changed from Uncategorized to Bug

The error message isn't generated by Django, I suppose it's displayed by your browser when it doesn't even receive an HTTP response.

comment:4 Changed 13 months ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.