Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 4ce7e9f

Browse files
reneighborMerricdeLauneyreidmit
committed
Only log blob-not-found errors in error case
We recently added these log lines, but we mistakenly did not put them in the error branch (so they were logging even in the success case). Co-authored-by: Renee Chu <rchu@pivotal.io> Co-authored-by: Merric De Launey <mdelauney@pivotal.io> Co-authored-by: Reid Mitchell <rmitchell@pivotal.io>
1 parent 9ea993c commit 4ce7e9f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

app/controllers/runtime/helpers/blob_dispatcher.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ def initialize(blobstore:, controller:)
66
end
77

88
def send_or_redirect(guid:)
9-
logger.error('No guid for BlobNotFound')
10-
raise CloudController::Errors::BlobNotFound unless guid
9+
unless guid
10+
logger.error('No guid for BlobNotFound')
11+
raise CloudController::Errors::BlobNotFound
12+
end
1113

1214
blob = @blobstore.blob(guid)
1315

14-
logger.error('No blob object for BlobNotFound')
15-
raise CloudController::Errors::BlobNotFound unless blob
16+
unless blob
17+
logger.error('No blob object for BlobNotFound')
18+
raise CloudController::Errors::BlobNotFound
19+
end
1620

1721
send_or_redirect_blob(blob)
1822
end

0 commit comments

Comments
 (0)