-
-
Notifications
You must be signed in to change notification settings - Fork 125
Catch more exceptions #11
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } catch (ResourceNotFoundException $e) { | ||
| $this->logger->warning(\sprintf('Failed to find resource: %s', $e->getMessage()), ['exception' => $e]); | ||
|
|
||
| return $this->encodeResponse(new Error($message->id ?? 0, Error::RESOURCE_NOT_FOUND, $e->getMessage())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from a design point of view this is too high for this specific exception - i would argue that it should be the responsibility of a resource specific handler to convert to an Error and the JsonRpcHandler should know nothing about specific capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least the RequestHandlerInterface should support that by signature
public function createResponse(Request $message): Response|Error;but we could also think of ErrorResponse or sth 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Thank you for pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated
|
I also made some classes with public properties "read-only" |
chr-hertel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
* Fix: Remove `composer.lock` * fix: ignore composer.lock --------- Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
* demo-repo/restructure: (31 commits) refactor: restructure into demo folder chore: update to llm-chain 0.22 (#27) refactor: more error handling in vidoe example chore: symfony 7.3 update fix: pin chroma db version and clean up (#26) feat: add demo of GPT vision capabilities based on video stream (#22) chore: dependecy update (#23) feat: extend wikipedia system prompt by tools (#21) chore: update to lib v0.19 (#20) refactor: optimize audio chat ui (#19) feat: audio example (#18) chore: updating dependencies (#17) chore: composer update incl twig cve patch (#16) chore: llm chain update with system_prompt support (#15) chore: install bundle 0.12 (#14) chore: update to llm-chain 0.11.0 (#13) chore: library update (#12) refactor: follow up on example structure to have them cleaner and more separated (#11) fix: typed animation only on xhr responses (#10) refactor: moving classes to a more component like structure (#9) ...
* demo-repo/restructure: (31 commits) refactor: restructure into demo folder chore: update to llm-chain 0.22 (#27) refactor: more error handling in vidoe example chore: symfony 7.3 update fix: pin chroma db version and clean up (#26) feat: add demo of GPT vision capabilities based on video stream (#22) chore: dependecy update (#23) feat: extend wikipedia system prompt by tools (#21) chore: update to lib v0.19 (#20) refactor: optimize audio chat ui (#19) feat: audio example (#18) chore: updating dependencies (#17) chore: composer update incl twig cve patch (#16) chore: llm chain update with system_prompt support (#15) chore: install bundle 0.12 (#14) chore: update to llm-chain 0.11.0 (#13) chore: library update (#12) refactor: follow up on example structure to have them cleaner and more separated (#11) fix: typed animation only on xhr responses (#10) refactor: moving classes to a more component like structure (#9) ...
* demo-repo/restructure: (31 commits) refactor: restructure into demo folder chore: update to llm-chain 0.22 (#27) refactor: more error handling in vidoe example chore: symfony 7.3 update fix: pin chroma db version and clean up (#26) feat: add demo of GPT vision capabilities based on video stream (#22) chore: dependecy update (#23) feat: extend wikipedia system prompt by tools (#21) chore: update to lib v0.19 (#20) refactor: optimize audio chat ui (#19) feat: audio example (#18) chore: updating dependencies (#17) chore: composer update incl twig cve patch (#16) chore: llm chain update with system_prompt support (#15) chore: install bundle 0.12 (#14) chore: update to llm-chain 0.11.0 (#13) chore: library update (#12) refactor: follow up on example structure to have them cleaner and more separated (#11) fix: typed animation only on xhr responses (#10) refactor: moving classes to a more component like structure (#9) ...
* integrate-demo: (31 commits) refactor: restructure into demo folder chore: update to llm-chain 0.22 (#27) refactor: more error handling in vidoe example chore: symfony 7.3 update fix: pin chroma db version and clean up (#26) feat: add demo of GPT vision capabilities based on video stream (#22) chore: dependecy update (#23) feat: extend wikipedia system prompt by tools (#21) chore: update to lib v0.19 (#20) refactor: optimize audio chat ui (#19) feat: audio example (#18) chore: updating dependencies (#17) chore: composer update incl twig cve patch (#16) chore: llm chain update with system_prompt support (#15) chore: install bundle 0.12 (#14) chore: update to llm-chain 0.11.0 (#13) chore: library update (#12) refactor: follow up on example structure to have them cleaner and more separated (#11) fix: typed animation only on xhr responses (#10) refactor: moving classes to a more component like structure (#9) ...
We should return
-32002if resource is not found