@@ -170,16 +170,32 @@ func (s *s3Store) Create(ctx context.Context, id string) (*UnitMetadata, error)
170170}
171171
172172func (s * s3Store ) Get (ctx context.Context , id string ) (* UnitMetadata , error ) {
173+ fmt .Printf ("[TEMPORARY LOG] S3Store.Get() CALLED\n " ) // temporary log
174+ fmt .Printf ("[TEMPORARY LOG] - Input ID: %q\n " , id ) // temporary log
175+ fmt .Printf ("[TEMPORARY LOG] - Bucket: %q\n " , s .bucket ) // temporary log
176+ fmt .Printf ("[TEMPORARY LOG] - Prefix: %q\n " , s .prefix ) // temporary log
177+
178+ s3Key := s .objKey (id )
179+ fmt .Printf ("[TEMPORARY LOG] - Constructed S3 Key: %q\n " , s3Key ) // temporary log
180+ fmt .Printf ("[TEMPORARY LOG] - Full S3 path would be: s3://%s/%s\n " , s .bucket , s3Key ) // temporary log
181+ fmt .Printf ("[TEMPORARY LOG] Calling HeadObject...\n " ) // temporary log
182+
173183 head , err := s .client .HeadObject (ctx , & s3.HeadObjectInput {
174184 Bucket : & s .bucket ,
175- Key : aws .String (s . objKey ( id ) ),
185+ Key : aws .String (s3Key ),
176186 })
187+
188+ fmt .Printf ("[TEMPORARY LOG] HeadObject returned - err: %v\n " , err ) // temporary log
177189 if err != nil {
190+ fmt .Printf ("[TEMPORARY LOG] Error details: %T - %v\n " , err , err ) // temporary log
178191 if isNotFound (err ) {
192+ fmt .Printf ("[TEMPORARY LOG] Identified as NOT FOUND error, returning ErrNotFound\n " ) // temporary log
179193 return nil , ErrNotFound
180194 }
195+ fmt .Printf ("[TEMPORARY LOG] Returning error as-is\n " ) // temporary log
181196 return nil , err
182197 }
198+ fmt .Printf ("[TEMPORARY LOG] HeadObject SUCCESS - ContentLength: %v, LastModified: %v\n " , head .ContentLength , head .LastModified ) // temporary log
183199 meta := UnitMetadata {ID : id }
184200 if head .ContentLength != nil {
185201 meta .Size = * head .ContentLength
0 commit comments