I'm building a backend API to a game. The user (frontend) requests an action and the backend performs the action, if legal. It needs to return a message to the frontend to let it know whether it needs to update the display.
It's okay if the move isn't legal. So
Err doesn't feel right here.
I was originally thinking to have every function return a bool for success. But I might later want to return a payload of some type. And the bool/int return is kinda a C mindset, right?
Option is kind of the wrong semantic here too.
So what should I do?