Add logging for Immich response with no items

This commit is contained in:
Eugene Burmakin 2024-11-27 14:06:49 +01:00
parent 45cbaf4b7e
commit 336654270d
3 changed files with 14 additions and 2 deletions

View file

@ -1 +1 @@
0.17.0
0.17.1

View file

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
# 0.17.1 - 2024-11-27
### Fixed
- Retrieving photos from Immich now correctly handles cases when Immich returns no items. It also logs the response from Immich for debugging purposes.
# 0.17.0 - 2024-11-26
## The Immich Photos release

View file

@ -36,7 +36,13 @@ class Immich::RequestPhotos
items = response.dig('assets', 'items')
break if items.empty?
if items.blank?
Rails.logger.debug('==== IMMICH RESPONSE WITH NO ITEMS ====')
Rails.logger.debug(response)
Rails.logger.debug('==== IMMICH RESPONSE WITH NO ITEMS ====')
break
end
data << items