Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): handle FileNotFoundError in serve_component_suites #2959

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

C0deBeez
Copy link
Contributor

@C0deBeez C0deBeez commented Aug 23, 2024

Added a try/except block to catch FileNotFoundError when attempting to serve component suites. This prevents the server from crashing when a requested file is not found, and instead returns a 404 status code.

In the development process of Dash components, .js.map files are often utilized for debugging purposes. However, these files may not be generated or included in the production releases. The absence of these files in the production environment can lead to a FileNotFoundError when the code attempts to load them.

To prevent this error from causing disruptions, I have added a try/except block to catch the FileNotFoundError when the Dash component suite attempts to serve these files. This modification ensures that the application continues to run smoothly in production environments, even if the .js.map files are missing.

This change is crucial for maintaining functionality in production environments where .js.map files are typically not included.

Added a try/except block to catch FileNotFoundError when attempting to serve component suites. This prevents the server from crashing when a requested file is not found, and instead returns a 404 status code.
@C0deBeez
Copy link
Contributor Author

C0deBeez commented Aug 23, 2024

@ndrezn Sorry, there were some issues with my local environment, so I have reopened a new PR here.

@C0deBeez C0deBeez closed this Oct 16, 2024
@C0deBeez C0deBeez reopened this Oct 16, 2024
@C0deBeez
Copy link
Contributor Author

C0deBeez commented Nov 8, 2024

@gvwilson Is it okay to proceed with merging?

@gvwilson
Copy link
Contributor

gvwilson commented Nov 8, 2024

@C0deBeez we're trying to get a release out the door next week but I'll have someone take a look at this as soon as that's done. thanks - @gvwilson

@gvwilson gvwilson self-assigned this Nov 8, 2024
@gvwilson gvwilson added P2 considered for next cycle fix fixes something broken labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P2 considered for next cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants