diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 5e317be6..142eee3d 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1759,10 +1759,10 @@ class HttpCli(object): fdir = os.path.dirname(fn) if not bos.path.isdir(fdir): - raise Pebkac(500, "parent folder does not exist") + raise Pebkac(409, "parent folder does not exist") if bos.path.isdir(fn): - raise Pebkac(500, "that folder exists already") + raise Pebkac(405, "that folder exists already") try: bos.mkdir(fn) diff --git a/copyparty/util.py b/copyparty/util.py index a0a4708f..7a65f6e5 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -162,6 +162,7 @@ HTTPCODE = { 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", + 409: "Conflict", 411: "Length Required", 412: "Precondition Failed", 413: "Payload Too Large",