Fractal: 404 errors cause fractal to stop

Created on 9 Sep 2019  路  4Comments  路  Source: frctl/fractal

Have you read Fractal's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect

Do you want to ask a question? Are you looking for support? The Fractal Slack channel is the best place for getting support: https://fractalize.slack.com

Prerequisites

Description

404 errors now generate an error for express to process, which bubbles as an event to the vorpal interface in web.start.js. with the latest change of 1.2.0 this causes the fractal dev server (fractal start) to stop after a 404 error.
Stopping after a 404 error is limiting the use cases for fractal, such as situations/states of components in the library that work for an unavailable backend (such as an image not available from a CMS).

I am creating a PR which will reference this issue.

Steps to Reproduce

  1. create a fractal project,
  2. create a component (.hbs) with an image tag with a domain relative src that generates the 404
  3. start dev server fractal start
  4. go to page of component

Expected behavior: dev server keeps running

Actual behavior: dev server stops

Reproduces how often: 100%

Versions

  • What version of Fractal are you running? 1.2.0
  • What version of Node.js are you running? 10.16.0

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Most helpful comment

While I have not investigated myself, I have run in to the same issue. #513 and #515, seemingly independent of each other, suggest the same fix鈥攚hich is a good sign.

All 4 comments

Please refer to my PR for a potential fix, and description of why this seems to occur: #515

While I have not investigated myself, I have run in to the same issue. #513 and #515, seemingly independent of each other, suggest the same fix鈥攚hich is a good sign.

It seemed the easiest fix to me looking at the project history, only thing is that express documentation suggests a different approach, by fixing it in the server code, see section on how to respond to 404 here: https://expressjs.com/en/starter/faq.html
Which makes sense from my point of view, but fixing the issue in this way requires more knowledge on fractal than I have at the moment, hehe :)

Fixed by #515

Was this page helpful?
0 / 5 - 0 ratings

Related issues

allmarkedup picture allmarkedup  路  7Comments

gui-gui picture gui-gui  路  6Comments

alexrussell picture alexrussell  路  7Comments

patphongs picture patphongs  路  5Comments

allmarkedup picture allmarkedup  路  3Comments