(folderId: string | null)
| 184 | } |
| 185 | |
| 186 | export async function assertFolderMutable(folderId: string | null): Promise<void> { |
| 187 | const status = await getFolderLockStatus(folderId) |
| 188 | if (status.locked) { |
| 189 | throw new FolderLockedError( |
| 190 | status.inheritedLocked ? 'Folder is locked by an ancestor folder' : 'Folder is locked' |
| 191 | ) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | export class FolderNotFoundError extends Error { |
| 196 | readonly status = 400 |
no test coverage detected