Do not return the information which was sent from the client.
If the command creates a new record, we need to return the proper message (such as 201 status with an identifier)
If the error was thrown by the business logic, we need to get a specific HTTP error type.
Best practice for CQRS command handler.
If the command creates a new record, we need to return the proper message (such as 201 status with an identifier) If the error was thrown by the business logic, we need to get a specific HTTP error type.
Todo