Closed Bug 554778 Opened 10 years ago Closed 10 years ago

[k] Error handling when search is down

Categories

(support.mozilla.org :: Search, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: jsocol)

Details

Attachments

(1 file)

Currently, if the Sphinx server is down, we just display no results. We should consider showing an error instead, as perfectly valid searches shouldn't return nothing just because Sphinx crashed. (Also, the errors will alert us faster.)
Should we also set a status code, or just display a message? (asked in bug 555249 before, sorry for the spam)
A 500 status is probably appropriate. I'll grab this, as I've been following Dave/Jeff's work today with the Sphinx issues.
Assignee: nobody → james
Paul: r? http://github.com/jsocol/kitsune/compare/554778-sphinx-errors

* Went with a 503 status, since it's more accurate.
* Adds a down.html template in the search app for catching SearchErrors thrown from the SearchClients.
* Adds tests for throwing search errors as well as two tests to improve the coverage of search/clients.py.
Priority: -- → P3
r+, looks good. Results are as expected.
http://github.com/jsocol/kitsune/commit/b50534d9bb8658982a180e18b90b0bc3ab5a22e8

Jeff has some outstanding comments that are good but not strictly relevant to this bug. I'll file something specifically for using the Django form to process the form input and clean up.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verified FIXED:

https://support-stage-new.mozilla.com/en-US/search?a=1&q=santcus+rea

GET /en-US/search?a=1&q=santcus+rea HTTP/1.1
Host: support-stage-new.mozilla.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://support-stage-new.mozilla.com/en-US/search?a=1&q=Profiles
Cookie: __utma=183859642.58456435.1271268035.1271785771.1271786186.21; __utmz=183859642.1271268035.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); s_vsn_mozillacom_1=9362621951264; s_vi=[CS]v1|25E3016085010B1F-4000010860031D63[CE]; s_vsn_mozillacomdev_1=3870162555520; SSID=ibMOJ50KjtBv0IwlI70F; WT_FPC=id=63.245.220.240-4021009120.30072030:lv=1271869827693:ss=1271867136149; wtspl=889583; s_cc=true; s_sq=%5B%5BB%5D%5D; SUMOv1=jaiafveo90n0shceru8nqknvi5; SUMOloggedin=true; sessionid=03f44ea1d8c6b91bce8ae0648fa32b74
Authorization: Basic c3VwcG9ydDpzdGFnZQ==

HTTP/1.1 503 SERVICE UNAVAILABLE
Date: Wed, 21 Apr 2010 18:29:15 GMT
Server: Apache/2.2.3 (Red Hat)
Set-Cookie: sessionid=03f44ea1d8c6b91bce8ae0648fa32b74; expires=Wed, 05-May-2010 18:29:16 GMT; Max-Age=1209600; Path=/
Cache-Control: max-age=0
Expires: Wed, 21 Apr 2010 18:29:15 GMT
Content-Length: 11443
Connection: close
Content-Type: text/html; charset=utf-8
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.