From a641d97c1b7cff839ee7fb0681fc84ef582b0a38 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 9 Nov 2009 20:08:43 +0000 Subject: better error for illegal_database_name. Closes COUCHDB-566 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@834211 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 7b876cfa..a49b4a4d 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -554,6 +554,10 @@ error_info(file_exists) -> "created, the file already exists.">>}; error_info({bad_ctype, Reason}) -> {415, <<"bad_content_type">>, Reason}; +error_info({error, illegal_database_name}) -> + {400, <<"illegal_database_name">>, <<"Only lowercase characters (a-z), " + "digits (0-9), and any of the characters _, $, (, ), +, -, and / " + "are allowed">>}; error_info({Error, Reason}) -> {500, couch_util:to_binary(Error), couch_util:to_binary(Reason)}; error_info(Error) -> -- cgit v1.2.3