fix: better error handling for malformed urls