this might need `if (!library) { return res.send(404, {'error': 'Could not find library'}); }`