File existence check result
★ 0.0 (0 ratings)25 min0 engineers solved this
Your assignment
This is a small client SDK for a file storage HTTP API. Applications create a StorageClient with the API base URL and credentials, then call from(bucketName) to get a file API for one bucket. That file API offers upload, download, list, move, remove, signed URL creation and an exists check. Every call resolves to an object with data and error fields rather than throwing, unless throwOnError() was chained first. Failed HTTP responses are converted into StorageApiError or StorageUnknownError instances through a shared fetch helper and a common error module. Callers branch on the error field to handle failures, and the returned data field holds the successful value.
What the team is seeing
My app checks whether a file is already stored before saving a new copy. For files that are not there yet, the check hands back an error together with its answer, so my error handling treats a normal situation as a failure. Real problems still come back as errors, as they should.
Acceptance checks 1
- Check 1
Discussion is locked — log in and complete this problem to join the discussion and rate your experience.
