Skip to content

Rework server networking - #11

Merged
Weffuls merged 25 commits into
mainfrom
rework-server-networking
Nov 2, 2026
Merged

Weffuls merged 25 commits into
mainfrom
rework-server-networking

Conversation

@Weffuls

@Weffuls Weffuls commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Reworks how the server takes in requests, handles them, and returns responses.

Mostly, minus JsonException and other unhandled exceptions, failures are handled with a Result-Pattern now instead of a giant try-catch where we purposely throw exceptions. This also gives us the chance to write more meaningful and reusable error messages, as each reason for failure is now its own object.

Move ListSpeciesRequest, ListSpeciesResponse and ListSpeciesRequestHandler to be inside "species" namespaces.
PMDDesktop.Requests.ListTypesRequest -> PMDDesktop.Requests.PokemonTypes.ListPokemonTypesRequest
PMDDesktop.Requests.ListTypesResponse -> PMDDesktop.Requests.PokemonTypes.ListPokemonTypesResponse
PMDDesktop.Server.RequestHandlers.ListTypesRequestHandler -> PMDDesktop.Server.RequestHandlers.ListPokemonTypesRequestHandler
WIP feature!! The code probably doesn't make a whole lot of sense right now!
This splits off of GenericReponseCreators, moving the function that used to live there.
…Error

This makes the intention of ResponseResultIndexMissingError more clear. It could be kinda confused with the meaning of ResponseResultDataInvalidError originally.
I forgot that Assert.All() requires you to actually assert something rather than just return true/false.
@Weffuls
Weffuls merged commit 5624f63 into main Nov 2, 2026
4 checks passed
@Weffuls
Weffuls deleted the rework-server-networking branch November 2, 2026 22:06
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