Skip to content

Commit

Permalink
log failure to delete sync as WARN instead of FATAL
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhadley committed Oct 17, 2023
1 parent d5a310b commit ab21dd0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions dropback/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [7.3.0] - 2023-10-17

### Added

- record an error state when fail to sync a delete to Dropbox

### Changed

- log failures to sync a delete to Dropbox as a WARN instead of FATAL

## [7.2.1] - 2023-10-16

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion dropback/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Dropback"
description: "Sync Home Assistant backups to Dropbox"
url: "https://github.com/matthewhadley/homeassistant-dropback"
version: "7.2.1"
version: "7.3.0"
slug: "dropback"
init: false
stdin: true
Expand Down
6 changes: 4 additions & 2 deletions dropback/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ while read -r INPUT; do
RESPONSE=$(./dropbox_uploader.sh -q -f $CONFIG_FILE delete "$FILE_PATH") || EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
bashio::log.info "Deleted $FILE_PATH on Dropbox"
set_dropback_entity Status OK
else
bashio::log.fatal "Failed to delete $FILE_PATH on Dropbox"
[ "$RESPONSE" != "" ] && bashio::log.fatal "$RESPONSE"
set_dropback_entity Status Error
bashio::log.warn "Failed to delete $FILE_PATH on Dropbox"
[ "$RESPONSE" != "" ] && bashio::log.warn "$RESPONSE"
fi
fi
EXIT_CODE=0
Expand Down

0 comments on commit ab21dd0

Please sign in to comment.