diff --git a/src/routes/volumes.js b/src/routes/volumes.js index 344904b5f..27607290b 100644 --- a/src/routes/volumes.js +++ b/src/routes/volumes.js @@ -19,7 +19,7 @@ const assert = require('assert'), async function load(req, res, next) { assert.strictEqual(typeof req.params.id, 'string'); - const [error, result] = safe(await volumes.get(req.params.id)); + const [error, result] = await safe(volumes.get(req.params.id)); if (error) return next(BoxError.toHttpError(error)); if (!result) return next(new HttpError(404, 'Volume not found')); req.resource = result;