img.onerror resolve right promise.