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/279 start documents uri not found #439

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

daniel-jettka
Copy link
Contributor

Description, Context and related Issue

When key start_documents_uri is no provided in prefs file, then an error message was thrown to the logs, which can be seen as too verbose. Some conditions were introduced to prevent the error message for this key. Can be extended to more keys if desired.

Refs #279

How Has This Been Tested?

Built and deployed Edirom with EditionExample. No error on console anymore.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have performed a self-review of my code
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

@daniel-jettka daniel-jettka linked an issue Oct 10, 2024 that may be closed by this pull request
@daniel-jettka daniel-jettka requested a review from bwbohl October 10, 2024 10:22
@roewenstrunk roewenstrunk self-requested a review October 11, 2024 08:24
Copy link
Member

@roewenstrunk roewenstrunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getPreference function has a second parameter lax. You could use that parameter in the openStartDocuements function. It will return null if there is no data. Then check uris for being null. No ignoredKeys in getPreferences needed.

@daniel-jettka
Copy link
Contributor Author

daniel-jettka commented Oct 11, 2024

The getPreference function has a second parameter lax. You could use that parameter in the openStartDocuements function. It will return null if there is no data. Then check uris for being null. No ignoredKeys in getPreferences needed.

Thanks for the addition! I tried that with values true and 1 for parameter lax (see comment), and it did not work. Should it get another value?

@daniel-jettka
Copy link
Contributor Author

The getPreference function has a second parameter lax. You could use that parameter in the openStartDocuements function. It will return null if there is no data. Then check uris for being null. No ignoredKeys in getPreferences needed.

Ah, wait... I had a caching issue. Will try again.

Copy link
Member

@roewenstrunk roewenstrunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me

@roewenstrunk roewenstrunk merged commit cf4862a into develop Oct 11, 2024
1 check passed
@roewenstrunk roewenstrunk deleted the fix/279-start_documents_uri-not-found branch October 11, 2024 08:58
@bwbohl
Copy link
Member

bwbohl commented Oct 11, 2024

Thanks @daniel-jettka & @roewenstrunk for fixing this ;-)

Diginaut pushed a commit to korngold-werkausgabe/Edirom-Online_EWK-WA that referenced this pull request Dec 16, 2024
* added exception to not throw error on empty key

* changed find in array method

* condition to only load links on start when provided

* changed to use of parameter lax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Uncaught error if 'start_documents_uri' not defined in prefs
3 participants