hiteshchoudhary / chai-backend

A video series on chai aur code youtube channel
5.06k stars 760 forks source link

typo in ApiError "statck" corrected by "stack" #5

Closed itsKayumkhan closed 11 months ago

itsKayumkhan commented 11 months ago

class ApiError extends Error { constructor( statusCode, message= "Something went wrong", errors = [], stack = "" ){ super(message) this.statusCode = statusCode this.data = null this.message = message this.success = false; this.errors = errors ### //change statck by stack if (stack) { this.stack = stack } else{ Error.captureStackTrace(this, this.constructor) }

}

}

export {ApiError}