Avoid Exception with potential info disclosure

Thanks, melvin @ HackerOne!
Avoid warning + potential information disclosure

Thanks, quistertow @ HackerOne and melvin @ HackerOne!