- Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Problem
Error messages are hardcoded throughout the codebase.
Examples
throw new NotFoundException("$"Group with ID '{command.Id}' not found."); throw new CustomException("Toggle status failed", errors); await context.Response.WriteAsync("Endpoint not found.");Files affected
- All handlers with validation
- Exception messages
- Response messages
Suggested approach
- Create
Resources/ErrorMessages.resx - Use
IStringLocalizer<T>for messages - Create constants for error codes
Impact
- Cannot localize application
- Inconsistent error messages
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels