Handle errors in query when return url is asked for. Stop creation if an error occurred.