Skip to content

Fix: ensure-upload-structure args & onError return path#22

Merged
HeyItsBATMAN merged 2 commits into
mainfrom
fixes
Jun 11, 2026
Merged

Fix: ensure-upload-structure args & onError return path#22
HeyItsBATMAN merged 2 commits into
mainfrom
fixes

Conversation

@HeyItsBATMAN

Copy link
Copy Markdown
Member

Two small bug fixes.

src/jobs/ensure-upload-structure.ts

directories.map(ensure) passed the array index as the 2nd arg of ensure(dir, recursive?), so the recursive flag was truthy for every entry after index 0. Now explicitly passes false.

src/index.ts

onError had an if (validation) { ... } else { return 500 } shape that left a non-returning path, tripping TS's not all code paths return a value. Flattened to a single err(...) + return status(500, ...) after the validation branch.

@HeyItsBATMAN HeyItsBATMAN marked this pull request as ready for review June 11, 2026 18:36
@HeyItsBATMAN HeyItsBATMAN merged commit c42f38a into main Jun 11, 2026
1 check passed
@HeyItsBATMAN HeyItsBATMAN deleted the fixes branch June 11, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant