Change failed download response code
This commit is contained in:
parent
50b1f66c59
commit
e66f5e890c
@ -134,7 +134,7 @@ def lambda_handler(event, context):
|
|||||||
return {'statusCode':400,'body':'Invalid image URL'}
|
return {'statusCode':400,'body':'Invalid image URL'}
|
||||||
combined = genImageFromURL(images)
|
combined = genImageFromURL(images)
|
||||||
if (combined == None):
|
if (combined == None):
|
||||||
return {'statusCode':400,'body':'Failed to download image(s)'}
|
return {'statusCode':500,'body':'Failed to download image(s)'}
|
||||||
buffered = BytesIO()
|
buffered = BytesIO()
|
||||||
combined.save(buffered,format="JPEG",quality=60)
|
combined.save(buffered,format="JPEG",quality=60)
|
||||||
combined_str=base64.b64encode(buffered.getvalue()).decode('ascii')
|
combined_str=base64.b64encode(buffered.getvalue()).decode('ascii')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user