@@ -85,7 +85,7 @@ async def a_create_container(
85
85
) as resp :
86
86
if resp .status not in {201 , 202 }:
87
87
raise aiohttp .web .HTTPForbidden (
88
- reason = "Can't create the upload container. "
88
+ reason = "Upload container creation failed "
89
89
)
90
90
LOGGER .debug (f"Created container { container } " )
91
91
@@ -107,11 +107,11 @@ async def a_sync_object_segments(
107
107
) as resp :
108
108
if resp .status == 404 :
109
109
raise aiohttp .web .HTTPNotFound (
110
- reason = "Couldn't find segment container. "
110
+ reason = "Segment container not found "
111
111
)
112
112
if resp .status == 403 :
113
113
raise aiohttp .web .HTTPForbidden (
114
- reason = "Not allowed to access segment container. "
114
+ reason = "Segment container access not allowed "
115
115
)
116
116
prefix = manifest .replace (manifest .split ('/' )[0 ], "" ).lstrip ('/' )
117
117
LOGGER .debug (f"Segment prefix: { prefix } " )
@@ -149,7 +149,7 @@ async def a_sync_object_segments(
149
149
150
150
if resp_g .status not in {200 , 201 , 202 }:
151
151
raise aiohttp .web .HTTPNotFound (
152
- reason = "Couldn't find segment "
152
+ reason = "Segment not found "
153
153
)
154
154
LOGGER .debug (f"Copying segment { segment } " )
155
155
headers ["Content-Length" ] = str (length )
@@ -173,7 +173,7 @@ async def a_sync_object_segments(
173
173
raise aiohttp .web .HTTPRequestTimeout ()
174
174
if resp_p .status not in {201 , 202 }:
175
175
raise aiohttp .web .HTTPBadRequest (
176
- reason = "Couldn't upload object segment "
176
+ reason = "Segment upload failed "
177
177
)
178
178
LOGGER .debug (f"Success in copying segment { segment } " )
179
179
@@ -202,7 +202,7 @@ async def a_copy_object(
202
202
# If the source object doesn't exist, abort
203
203
if resp_g .status != 200 :
204
204
raise aiohttp .web .HTTPBadRequest (
205
- reason = "Couldn't fetch the source object. "
205
+ reason = "Source object fetch failed "
206
206
)
207
207
LOGGER .debug (f"Got stream handle for { object_name } " )
208
208
@@ -242,7 +242,7 @@ async def a_copy_object(
242
242
raise aiohttp .web .HTTPRequestTimeout ()
243
243
if resp_p .status not in {201 , 202 }:
244
244
raise aiohttp .web .HTTPBadRequest (
245
- reason = "Couldn't upload object segment "
245
+ reason = "Object segment upload failed "
246
246
)
247
247
LOGGER .debug (f"Success in copying object { object_name } " )
248
248
else :
@@ -271,7 +271,7 @@ async def a_copy_object(
271
271
) as resp :
272
272
if resp .status != 201 :
273
273
raise aiohttp .web .HTTPInternalServerError (
274
- reason = "Manifest creation failure. "
274
+ reason = "Object manifest creation failed "
275
275
)
276
276
LOGGER .debug (f"Uploaded manifest for { object_name } " )
277
277
@@ -300,7 +300,7 @@ async def a_copy_from_container(self):
300
300
f"Container fetch failed with status { resp .status } "
301
301
)
302
302
raise aiohttp .web .HTTPBadRequest (
303
- reason = "Couldn't fetch the source container "
303
+ reason = "Source container fetch failed "
304
304
)
305
305
LOGGER .debug ("Got container object listing" )
306
306
objects = await resp .text ()
0 commit comments