Skip to content

Bug: Cloudinary upload stream has no error handler - causes hanging requests #351

Description

@Aamod-Dev

File: BACKEND/controllers/product.controller.js (lines 11-21)

Severity: MEDIUM

Problem: The uploadToCloudinary function creates a stream but never attaches an error handler. If the stream emits an error before the callback is invoked, the promise never settles, causing the HTTP request to hang indefinitely until timeout.

Fix: Add stream.on('error', reject) before stream.end(buffer).

Metadata

Metadata

Assignees

Labels

backendFor changes related to the Express server, API routes, or MongoDB modelsbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions