My Django app runs on an Oracle database.

A few times a year, the database is unavailable because of a scheduled 
process or unplanned downtime. However, I can't see how to catch the error 
and give a useful message back to the requester. Instead, a 500 error is 
triggered, and I get an email (or hundreds) showing the exception. One 
example is:

  File 
"/opt/UDO/env/events/lib/python2.6/site-packages/django/db/backends/oracle/base.py",
 line 447, in _cursor
    self.connection = Database.connect(conn_string, **conn_params)

DatabaseError: ORA-01035: ORACLE only available to users with RESTRICTED 
SESSION privilege

I see a similar error with a different ORA number when the DB is down.

Because the exception is thrown deep within the Django libraries, and can 
be triggered by any of my views or the built in admin views, I don't know 
where any exception trapping code would go.

Any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DED1N0VNlGwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to