luceroweb / luceroweb/cineflix

[SPIKE]: Unknown error

Open
#3 0 comments 0 reactions 1 assignee View on GitHub

@luceroweb is already working on this.

Since Aug 13, 2023.

bug
Dominant language
JavaScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Steps to Reproduce: Unknown

Actual Response:
```
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:399:5)
at ServerResponse.setHeader (node:_http_outgoing:663:11)
at ServerResponse.header (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\response.js:794:10)
at ServerResponse.send (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\response.js:174:12)
at ServerResponse.json (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\response.js:278:15)
at prodErrors (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\Controllers\errorController.js:41:34)
at module.exports (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\Controllers\errorController.js:66:5)
at Layer.handle_error (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\router\layer.js:71:5)
at trim_prefix (C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\router\index.js:326:13)
at C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\node_modules\express\lib\router\index.js:286:9
TypeError: Cannot read properties of null (reading 'createResetPasswordToken')
at C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\Controllers\authController.js:131:27
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot set properties of null (setting 'password')
at C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\Controllers\authController.js:185:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot set properties of null (setting 'password')
at C:\Users\Juan Clark-Lucero\OneDrive\Documents\nodejs-course\cineflix\Controllers\authController.js:185:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
Expected Result: No console errors should be returned

Reported by: @luceroweb

Source URL: PATCH /api/v1/users/resetPassword/:resetToken

Browser: Postman v10.17.1
OS: Windows 11 Home
Node: v19.4.0

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.