Skip to content

Commit

Permalink
Merge pull request #446 from Freika/fix/immich-response-log
Browse files Browse the repository at this point in the history
Add logging for Immich response with no items
  • Loading branch information
Freika authored Nov 27, 2024
2 parents 45cbaf4 + 3366542 commit 699a3de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .app_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.0
0.17.1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion app/services/immich/request_photos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ def retrieve_immich_data

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

Expand Down

0 comments on commit 699a3de

Please sign in to comment.