Err(e)ifCustomHttpClientError::downcast_ref(&e).is_some()=>returnErr(e.into()),// If blacklisted stop immediately instead of checking the rest of the icons. see explanation and actual handling inside get_icon()
Err(e)=>{
warn!("Unable to download icon: {e:?}");
// Continue to next icon
continue;
}
};
buffer=stream_to_bytes_limit(res,5120*1024).await?;// 5120KB/5MB for each icon max (Same as icons.bitwarden.net)
// Check if the icon type is allowed, else try an icon from the list.
// Check if the icon type is allowed, else try another icon from the list.