diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-28 21:05:45 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-28 21:05:45 -0400 |
commit | 945fb3387b56be0da576d06155f35372b35095bc (patch) | |
tree | b1b15e4f25c7797c3854f4870a09662f3bff4207 /HTTP | |
parent | 2cb51e23ba6d881e94f36baa9b8e21b80951880c (diff) | |
download | keysafe-945fb3387b56be0da576d06155f35372b35095bc.tar.gz |
better error for invalid object size
Diffstat (limited to 'HTTP')
-rw-r--r-- | HTTP/Server.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/HTTP/Server.hs b/HTTP/Server.hs index 7086167..816cf47 100644 --- a/HTTP/Server.hs +++ b/HTTP/Server.hs @@ -66,8 +66,8 @@ putObject st i _pow o = do then do r <- liftIO $ storeShare serverStorage i (Share dummyShareNum o) liftIO $ requestObscure st - return (Result r) - else throwError err413 -- Request Entity Too Large + return $ Result r + else return $ Result $ StoreFailure "invalid object size" countObjects :: ServerState -> Maybe ProofOfWork -> Handler (ProofOfWorkRequirement CountResult) countObjects _st _pow = liftIO $ Result <$> countShares serverStorage |