Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/blueapi/service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def submit_task(
for err in e.errors()
]

LOGGER.info("Error submitting task: %s - %s", task_request, e)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: info seems low. I would say at least warn, maybe even error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really an error from blueapi's perspective if the user provided invalid input. Happy to see what others think though

@ZohebShaikh ZohebShaikh Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a client error but a server info so I agree with Peter that it should only be logged as info on server side.

This is similar to how fastapi handles a request which has correct syntax but wrong instruction, and we are sending the correct response for it 422 same as fastapi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I think it will make support slightly easier if it's error but I'm not that fussed as long as the information is there

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge it for now, but if it proves to be frustrating on the user side we can change it

raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail=errors,
Expand Down
Loading