Skip to content

πŸ›οΈ Architect: Centralize _raise_not_found Across Endpoints#858

Draft
fderuiter wants to merge 1 commit intomainfrom
architect-centralize-raise-not-found-1361347405524891355
Draft

πŸ›οΈ Architect: Centralize _raise_not_found Across Endpoints#858
fderuiter wants to merge 1 commit intomainfrom
architect-centralize-raise-not-found-1361347405524891355

Conversation

@fderuiter
Copy link
Copy Markdown
Owner

πŸ›οΈ Design Change:
Centralized the _raise_not_found method inside EndpointABC and mapped its required signature into EndpointProtocol. Removed duplicated definitions from PathGetEndpointMixin and JobsEndpoint and utilized self._raise_not_found within FilterGetEndpointMixin.

♻️ DRY Gains:
Eliminated duplicated error-raising logic across 3 different files. The logic now lives in a single place (EndpointABC), guaranteeing uniform exception structures.

πŸ›‘οΈ Solidity:
Improved Explicit > Implicit design by having a centralized standard exception mechanism. Retained strict types and full sync/async parity since the logic resides in the shared base class.

⚠️ Breaking Changes:
None. Input parameters and behavior remains completely identical. Internally, exceptions utilize the MODEL metadata, meaning JobsEndpoint changed its exception string slightly to match the standard format, which is an intentional architectural alignment.


PR created automatically by Jules for task 1361347405524891355 started by @fderuiter

Moved `_raise_not_found` from independent mixins (`PathGetEndpointMixin`,
`FilterGetEndpointMixin`, and `JobsEndpoint`) into the base `EndpointABC` class
to reduce duplication, ensure consistency, and decrease cognitive load.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant