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
wangsen
MinerU
Commits
b78551af
"docs/vscode:/vscode.git/clone" did not exist on "8e8135965d9ff4e3feb881ed087c970bf65c7b0c"
Commit
b78551af
authored
Jul 02, 2025
by
myhloli
Browse files
fix: update error messages in fast_api.py for improved clarity and consistency
parent
54cf49df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mineru/cli/fast_api.py
mineru/cli/fast_api.py
+3
-3
No files found.
mineru/cli/fast_api.py
View file @
b78551af
...
@@ -70,12 +70,12 @@ async def parse_pdf(
...
@@ -70,12 +70,12 @@ async def parse_pdf(
except
Exception
as
e
:
except
Exception
as
e
:
return
JSONResponse
(
return
JSONResponse
(
status_code
=
400
,
status_code
=
400
,
content
=
{
"error"
:
f
"
处理文件失败
:
{
str
(
e
)
}
"
}
content
=
{
"error"
:
f
"
Failed to load file
:
{
str
(
e
)
}
"
}
)
)
else
:
else
:
return
JSONResponse
(
return
JSONResponse
(
status_code
=
400
,
status_code
=
400
,
content
=
{
"error"
:
f
"
不支持的文件类型
:
{
file_path
.
suffix
}
"
}
content
=
{
"error"
:
f
"
Unsupported file type
:
{
file_path
.
suffix
}
"
}
)
)
...
@@ -159,7 +159,7 @@ async def parse_pdf(
...
@@ -159,7 +159,7 @@ async def parse_pdf(
logger
.
exception
(
e
)
logger
.
exception
(
e
)
return
JSONResponse
(
return
JSONResponse
(
status_code
=
500
,
status_code
=
500
,
content
=
{
"error"
:
str
(
e
)}
content
=
{
"error"
:
f
"Failed to process file:
{
str
(
e
)
}
"
}
)
)
...
...
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