improve upload error log messages
This commit is contained in:
parent
7f8e63f19b
commit
049956544e
@ -50,7 +50,7 @@ def accept_upload(request):
|
|||||||
resp = 'success'
|
resp = 'success'
|
||||||
else:
|
else:
|
||||||
resp = 'failure'
|
resp = 'failure'
|
||||||
logger.warn('Error encountered importing uploaded block')
|
logger.warn(f'Error encountered importing uploaded block {b_hash}')
|
||||||
except onionrexceptions.BlacklistedBlock:
|
except onionrexceptions.BlacklistedBlock:
|
||||||
logger.debug('uploaded block is blacklisted')
|
logger.debug('uploaded block is blacklisted')
|
||||||
resp = 'failure'
|
resp = 'failure'
|
||||||
@ -62,6 +62,7 @@ def accept_upload(request):
|
|||||||
abort(400)
|
abort(400)
|
||||||
elif resp == 'proof':
|
elif resp == 'proof':
|
||||||
resp = Response(resp, 400)
|
resp = Response(resp, 400)
|
||||||
|
logger.warn(f'Error encountered importing uploaded block, invalid proof {b_hash}')
|
||||||
else:
|
else:
|
||||||
resp = Response(resp)
|
resp = Response(resp)
|
||||||
return resp
|
return resp
|
||||||
|
Loading…
Reference in New Issue
Block a user