Skip to content

Conversation

ytilotti
Copy link
Contributor

Q A
Branch? 4.1
License MIT

To complete the PR #6332 and add error management to the overall package (Config, Resource and/or Operation).

Now can configurable with:

api_platform:
    defaults:
        errors:
            - App\Exception\MyDomainException

Manageable with overrideResponses of #6221

@ytilotti ytilotti force-pushed the ytilotti-patch-2 branch 2 times, most recently from 2a45752 to fee97bc Compare April 11, 2025 13:27
$defaultError->withStatus(400)->withDescription('Invalid input'),
$defaultValidationError,
], $resourceMetadataCollection, $schema, $schemas, $operation);
}
Copy link
Member

Choose a reason for hiding this comment

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

The idea behind this is that if an error is defined by the user we do not add our custom errors.

Copy link
Member

Choose a reason for hiding this comment

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

could you revert the changes here? operations already inherit from resources and we shouldn't add any errors if the user has configured some or else its not possible to override defaults

Copy link

stale bot commented Aug 25, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants