Merge pull request #446 from Freika/fix/immich-response-log

Add logging for Immich response with no items
This commit is contained in:
Evgenii Burmakin 2024-11-27 14:08:59 +01:00 committed by GitHub
commit 699a3de57c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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