mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-10 14:20:49 +08:00
Handle custom_nodes returning None responses more gracefully
This commit is contained in:
parent
89f6d3482e
commit
5412451def
@ -232,6 +232,10 @@ async def middleware(request, handler):
|
||||
except web.HTTPException as ex:
|
||||
set_status_code(span, ex.status_code)
|
||||
raise
|
||||
except AttributeError:
|
||||
# No response was returned or a NoneType response was returned, handle gracefully
|
||||
set_status_code(span, 500)
|
||||
raise
|
||||
finally:
|
||||
duration = max((default_timer() - start) * 1000, 0)
|
||||
duration_histogram.record(duration, duration_attrs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user