Creates a standardized failure response
Error message describing the failure
FailureResponse object with null data and the error message
const result = failure('User not found');// Result: { data: null, error: 'User not found' } Copy
const result = failure('User not found');// Result: { data: null, error: 'User not found' }
Creates a standardized failure response