Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
e7b9d2c0
"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "b77f9ec0bbebaface15346f088aac1e95d907543"
Commit
e7b9d2c0
authored
May 14, 2023
by
comfyanonymous
Browse files
/prompt endpoint error is now in json format.
parent
3a1f4776
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
server.py
server.py
+3
-4
web/scripts/api.js
web/scripts/api.js
+1
-1
web/scripts/app.js
web/scripts/app.js
+1
-1
No files found.
server.py
View file @
e7b9d2c0
...
@@ -323,12 +323,11 @@ class PromptServer():
...
@@ -323,12 +323,11 @@ class PromptServer():
self
.
prompt_queue
.
put
((
number
,
prompt_id
,
prompt
,
extra_data
,
valid
[
2
]))
self
.
prompt_queue
.
put
((
number
,
prompt_id
,
prompt
,
extra_data
,
valid
[
2
]))
return
web
.
json_response
({
"prompt_id"
:
prompt_id
})
return
web
.
json_response
({
"prompt_id"
:
prompt_id
})
else
:
else
:
resp_code
=
400
out_string
=
valid
[
1
]
print
(
"invalid prompt:"
,
valid
[
1
])
print
(
"invalid prompt:"
,
valid
[
1
])
return
web
.
json_response
({
"error"
:
valid
[
1
]},
status
=
400
)
else
:
return
web
.
json_response
({
"error"
:
"no prompt"
},
status
=
400
)
return
web
.
Response
(
body
=
out_string
,
status
=
resp_code
)
@
routes
.
post
(
"/queue"
)
@
routes
.
post
(
"/queue"
)
async
def
post_queue
(
request
):
async
def
post_queue
(
request
):
json_data
=
await
request
.
json
()
json_data
=
await
request
.
json
()
...
...
web/scripts/api.js
View file @
e7b9d2c0
...
@@ -163,7 +163,7 @@ class ComfyApi extends EventTarget {
...
@@ -163,7 +163,7 @@ class ComfyApi extends EventTarget {
if
(
res
.
status
!==
200
)
{
if
(
res
.
status
!==
200
)
{
throw
{
throw
{
response
:
await
res
.
text
(),
response
:
await
res
.
json
(),
};
};
}
}
}
}
...
...
web/scripts/app.js
View file @
e7b9d2c0
...
@@ -1222,7 +1222,7 @@ export class ComfyApp {
...
@@ -1222,7 +1222,7 @@ export class ComfyApp {
try
{
try
{
await
api
.
queuePrompt
(
number
,
p
);
await
api
.
queuePrompt
(
number
,
p
);
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
ui
.
dialog
.
show
(
error
.
response
||
error
.
toString
());
this
.
ui
.
dialog
.
show
(
error
.
response
.
error
||
error
.
toString
());
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment