Added more unit tests. Modified the "_onFailed"
handler to prevent rogue servers from raising
exceptions.