openedx / openedx/frontend-base

Improve `getResolvedSiteConfigPath` error message logic

Open Beginner friendly
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4
Forks
13
Avg merge
3h 21m
Merged PRs (30d)
10

Description

When SITE_CONFIG_PATH is set but invalid, it silently falls through to try the default path instead of erroring immediately.

This means for the following flows:

SITE_CONFIG_PATH defined SITE_CONFIG_PATH exists defaultPath exists Result
N/A No error. Site config path returned.
No error. Default path returned.
Error saying env var path is invalid, no mention of default path.
No error. Default path returned.
Error saying default path is invalid.

The main issue here is that the error messaging doesn't accurately reflect what's happening. No mention of falling back to the default path, and only showing the env var error message when both the env var path and the default path are invalid.

https://github.com/openedx/frontend-base/blob/d511970513aabcca86a9ae71c17c18779e9b514a/tools/webpack/utils/getResolvedSiteConfigPath.ts#L21-L26

Contributor guide

Open the contributing guide

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.

Research direction

Start in tools/webpack/utils/getResolvedSiteConfigPath.ts at the linked lines and trace how SITE_CONFIG_PATH and defaultPath are checked. Compare the current behavior with each case in the issue table, then verify that the selected path and error message match those outcomes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.