Page MenuHomePhabricator

Prevent transport-layer responsibilities leaking into UseCases
Closed, DeclinedPublic5 Estimated Story Points

Description

In both the CRUD and Search domains, transport-layer responsibilities are leaking into UseCases. For example, the UseCases can throw http specific "query parameter" exceptions. The UseCase should be throwing generic "invalid value" errors, and then it's up to the RouteHandler to decide how it should handle each error.

AC: invalid-path-parameter and invalid-query-parameter error codes are not included in UseCaseErrors. RouteHandlers will produce them instead, based on the transport layer agnostic UseCaseError.

Event Timeline

WMDE-leszek set the point value for this task to 5.May 22 2025, 10:26 AM
WMDE-leszek moved this task from Polished to Ready for planning on the Wikibase Reuse Team board.

Change #1166367 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] Search: Introduce ResponseFactory

https://gerrit.wikimedia.org/r/1166367

Change #1166387 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] Search: Move http specifics out of UseCaseError

https://gerrit.wikimedia.org/r/1166387

Silvan_WMDE moved this task from Peer Review to Done on the Wikibase Reuse Team (Sprint 49) board.

We decided not to do this at the moment and to write down the reasons in an ADR (see T399574).