Incorrect `UploadApiErrorResponse` type

Open
#712 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript
Domain
api

Research direction

Locate the UploadApiErrorResponse declaration in the Cloudinary NPM SDK and compare it with the API response shape described in the issue. Update the type so the error envelope is represented, then verify the declaration and any existing type checks against the reported response.

Written by the indexing model from the issue text.

Description

Bug report for Cloudinary NPM SDK

Before proceeding, please update to latest version and test if the issue persists

Describe the bug in a sentence or two.

The type for UploadApiErrorResponse is { message: string } (plus other fields), but the actual API response is { error: { message: string } } (note the error envelope).

Issue Type (Can be multiple)

  • Build - Can’t install or import the SDK
  • Babel - Babel errors or cross browser issues
  • Performance - Performance issues
  • Behaviour - Functions aren’t working as expected (Such as generate URL)
  • Documentation - Inconsistency between the docs and behaviour
  • Incorrect Types - For typescript users who are having problems with our d.ts files
  • Other (Specify)

Steps to reproduce

N/A

Error screenshots

N/A

Browsers (if issue relates to UI, else ignore)

N/A

Versions and Libraries (fill in the version numbers)

Cloudinary_NPM SDK version - 2.6.1
Node - 22.12.0
NPM - 10.9.0

Config Files (Please paste the following files if possible)

N/A

Repository

N/A

Dominant language
JavaScript
Stars
672
Forks
318
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudinary/cloudinary_npm

All issues in cloudinary/cloudinary_npm

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.