From afa63c9e602573ddebed911afa975f759c7b1259 Mon Sep 17 00:00:00 2001
From: sakamotomsh <sakamotomsh@lolloo.net>
Date: Mon, 26 Jan 2015 23:01:07 +0900
Subject: [PATCH] Fix error message.

---
 httpd/handler.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpd/handler.go b/httpd/handler.go
index db2d26df9c..cc82400cfc 100644
--- a/httpd/handler.go
+++ b/httpd/handler.go
@@ -184,7 +184,7 @@ func (h *Handler) serveWrite(w http.ResponseWriter, r *http.Request, user *influ
 		}
 
 		if h.requireAuthentication && !user.Authorize(influxql.WritePrivilege, br.Database) {
-			writeError(influxdb.Result{Err: fmt.Errorf("%q user is not authorized to write to database %q", user.Name)}, http.StatusUnauthorized)
+			writeError(influxdb.Result{Err: fmt.Errorf("%q user is not authorized to write to database %q", user.Name, br.Database)}, http.StatusUnauthorized)
 			return
 		}