Item Operations "Not Found" error
See original GitHub issueI am having issues with my item operations for my endpoints. I am assuming it’s not picking up the {id} in the path.
resources.yaml
App\Entity\Agent:
collectionOperations:
post:
method: 'POST'
path: '/agent'
validation_groups: ['Default','postValidation']
controller: 'App\Controller\CreateAgent'
itemOperations:
put:
method: 'PUT'
path: '/agent/{id}/update'
validation_groups: ['Default']
controller: 'App\Controller\UpdateAgent'
get:
method: 'GET'
path: '/agent/{id}/client-information'
controller: 'App\Controller\GetClientInformation'
normalization_context:
groups: ['clientInformationResults']
controller for one of the endpoints:
namespace App\Controller;
use App\Entity\Agent;
class GetClientInformation
{
/**
* @param Agent $data
* @return Agent
*/
public function __invoke(Agent $data): Agent
{
return $data;
}
}
Error
@context": "/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "Not Found",
"trace": [
{
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/app/vendor/api-platform/core/src/EventListener/ReadListener.php",
"line": 107,
"args": []
},
...........
I am assuming I am missing something in my configs but I can’t find any examples of this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Symfony Api Platform 400 Not Found Error While doing ...
I would like to do default item crud operations with odm. I did with ORM it was okay but I have problems with...
Read more >How to Fix the "Item Not Found" Windows Error When ...
Each time I was trying to delete the folder, Windows was giving me a prompt saying "This is no longer located in [location]....
Read more >Why am I getting this error? "Item not found "
I get this item whenever I try and move certain folders. What happened first was that I backed up my old system to...
Read more >The Operation Failed. An Object Could Not Be Found Error
An object could not be found” error is the common error encountered by the Outlook users while clicking on Send / Receive option....
Read more >Common errors | Content API for Shopping
notFound ; Common causes, Attempting to delete a product that doesn't exist, or not specifying the product ID correctly in the URL for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

it does explain why I had it working with the data persister and provider, but was really hoping for some magic. Still new to symfony and api platform.
THanks for the help!
I am really just using the Entity for validation and the api endpoints. Okay cool