Tell us what’s happening:
Submitting the link in FCC yields an incorrect solution text: The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE.
Fairly new to glitch and node so I’m not sure what I’m doing wrong. I looked around the forums and tried different variation of the solution but alas nothing is working. SOS.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
Please use the “preformatted text” tool in the editor (</>) to add backticks around text.
Thank you for the reply. I saw your post in another forum. I believe it is some sort of server error on the FCC end. Every time I submit the link on FCC, it break the app on glitch.
_http_outgoing.js:470
1:50 PM
throw new ERR_HTTP_HEADERS_SENT(‘set’);
1:50 PM
^
1:50 PM
1:50 PM
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
1:50 PM
at ServerResponse.setHeader (_http_outgoing.js:470:11)
1:50 PM
at ServerResponse.header (/rbd/pnpm-volume/eba63627-f26a-44ed-be74-971cc151e5f0/node_modules/express/lib/response.js:771:10)
1:50 PM
at ServerResponse.send (/rbd/pnpm-volume/eba63627-f26a-44ed-be74-971cc151e5f0/node_modules/express/lib/response.js:170:12)
1:50 PM
at ServerResponse.json (/rbd/pnpm-volume/eba63627-f26a-44ed-be74-971cc151e5f0/node_modules/express/lib/response.js:267:15)
1:50 PM
at /rbd/pnpm-volume/eba63627-f26a-44ed-be74-971cc151e5f0/node_modules/fcc-express-bground/index.js:97:15
1:50 PM
at IncomingMessage.r.on (/rbd/pnpm-volume/eba63627-f26a-44ed-be74-971cc151e5f0/node_modules/fcc-express-bground/index.js:29:26)
1:50 PM
at IncomingMessage.emit (events.js:189:13)
1:50 PM
at IncomingMessage.Readable.read (_stream_readable.js:487:10)
1:50 PM
at flow (stream_readable.js:953:34)
1:50 PM
at resume (_stream_readable.js:934:3)
We will be looking into it, but nothing has changed on freeCodeCamp’s side that would affect this. So, I suspect it is likely some new compatibility issue.