Summary
Enhance the Response class to include an error message field. This will clarify why a returned record is null (e.g., "Input list was empty" or "Input list was null").
Proposed Change
- Add a
String errorMessage field to the Response class.
- Populate
errorMessage when input is invalid.
Benefit
Improves clarity for users and helps with debugging.
Summary
Enhance the
Responseclass to include an error message field. This will clarify why a returned record is null (e.g., "Input list was empty" or "Input list was null").Proposed Change
String errorMessagefield to theResponseclass.errorMessagewhen input is invalid.Benefit
Improves clarity for users and helps with debugging.