Handle rangeHashes

GitOrigin-RevId: 9b9a67d8e45f17e948d003aed33cef6128a25744
This commit is contained in:
Andrew Rumble
2025-06-25 08:06:50 +00:00
committed by Copybot
parent 34b674aa6f
commit 903277c222
@@ -49,10 +49,18 @@ class BackupBlobStore {
* Required for BlobStore interface - not supported.
*
* @template T
* @param {string} hash
* @return {Promise<T>}
*/
async getObject() {
throw new Error('Not implemented')
async getObject(hash) {
try {
const stream = await this.getStream(hash)
const buffer = await streams.readStreamToBuffer(stream)
return JSON.parse(buffer.toString())
} catch (err) {
logger.warn({ err, hash }, 'Failed to fetch chunk blob')
throw err
}
}
/**