Handle SQL API errors by logging them and requesting NO cache

SQL api is used to determine the list of source tables affected
by a query. Before this commit, the X-Cache-Channel header set
on sql api error was an arbitrary 'table' string, now the header
is omitted, the error logged and Cache-Control and Pragma headers
are sent as an attempt to request no caching.

The code includes test for this mechanism.
This commit is contained in:
Sandro Santilli
2013-03-13 10:39:00 +01:00
parent 49aad435b9
commit e8cbc666e2
5 changed files with 121 additions and 26 deletions
+1 -3
View File
@@ -97,8 +97,6 @@ ALTER TABLE ONLY gadm4
CREATE INDEX bdll25_provincias_4326_2_the_geom_webmercator_idx ON gadm4 USING gist (the_geom_webmercator);
-- development_cartodb_user_3 role
CREATE USER development_cartodb_user_3;
GRANT ALL ON TABLE gadm4 TO development_cartodb_user_3;
GRANT ALL ON TABLE gadm4 TO test_cartodb_user_1;
GRANT SELECT ON TABLE gadm4 TO publicuser;