Updated `HandleExceptionAsync` to set response status directly for each exception type and streamlined JSON serialization of error messages.
Updated `HandleExceptionAsync` to set response status directly for each exception type and streamlined JSON serialization of error messages.