web: Add more data for jsonrpc responses. (#3296)

This change adds more richer error response
for JSON-RPC by interpreting object layer
errors to corresponding meaningful errors
for the web browser.

```go
&json2.Error{
   Message: "Bucket Name Invalid, Only lowercase letters, full stops, and numbers are allowed.",
}
```

Additionally this patch also allows PresignedGetObject()
to take expiry parameter to have variable expiry.
This commit is contained in:
Harshavardhana
2016-11-22 11:12:38 -08:00
committed by GitHub
parent 4098025c11
commit dd93f808c8
11 changed files with 221 additions and 152 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ func createLockTestServer(t *testing.T) (string, *lockServer, string) {
t.Fatalf("unable initialize config file, %s", err)
}
jwt, err := newJWT(defaultJWTExpiry)
jwt, err := newJWT(defaultJWTExpiry, serverConfig.GetCredential())
if err != nil {
t.Fatalf("unable to get new JWT, %s", err)
}