Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hint for mapping request payload error messages#19121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
OskarStark merged 1 commit intosymfony:6.3fromdbu:patch-1
Nov 9, 2023

Conversation

dbu
Copy link
Contributor

@dbudbu commentedNov 8, 2023

The information is particularly important in the context of theMapRequestPayload but technically not related. It is about the behaviour of the symfony error handler. If there is more documentation about the error handler and output formats, i am happy to link to that if you point me to the right place.

I think it is valuable to mention this here though, as it will happen when using the feature. I almost gave up and set up some custom exception listener or whatnot to output json. Stackoverflow is full of answers proposing those to output errors as JSON.

@OskarStark
Copy link
Contributor

Target 5.4 I guess?

format. This will make the error handling output a JSON response in case of
validation errors, rather than an HTML page::

#[Route('/dashboard', name: 'dashboard', format: 'json')]
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

the build fails on this. should we make it a different type of code block or do we need to add php code to make the ci happy?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can ignore it

Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
@dbu
Copy link
ContributorAuthor

dbu commentedNov 9, 2023

i found the place to reference the format option and linked it.

Target 5.4 I guess?

this hint is aboutMapRequestPayload which has been added in version 6.3.

if there is documentation about working with the error handler in general, it would make sense to add it there. buthttps://symfony.com/components/ErrorHandler is empty.

https://symfony.com/doc/current/controller/error_pages.html#overriding-error-output-for-non-html-formats talks about custom normalizers - maybe somewhere in that chapter a hint would make sense.

@OskarStarkOskarStark added this to the6.3 milestoneNov 9, 2023
@OskarStark
Copy link
Contributor

Thank you David.

@OskarStarkOskarStark merged commitf205e2c intosymfony:6.3Nov 9, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.3
Development

Successfully merging this pull request may close these issues.

3 participants
@dbu@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp