Add tests for all error scenarios and edge cases
Add tests for all error scenarios and edge cases