If an invalid URL is passed, catch the exception and turn it into an ErrorP2Repository