Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 31, 2023

closes #13877

If the extract given by Wikibooks is an empty string, but is still there, it currently throws that api error due to

else if (!page.extract)
show('error: unexpected API response:<br><pre>' + JSON.stringify(page) + '</pre>');

Need to check that it is not empty first, so that it doesn't show an api error in this case

I chose to just show nothing as if the opening doesn't exist (because it doesn't in Wikibooks)

@ornicar ornicar merged commit db24186 into lichess-org:master Nov 1, 2023
@ghost ghost deleted the wiki-api-failure-fix branch November 1, 2023 08:30
ornicar added a commit to kraktus/lila that referenced this pull request Nov 1, 2023
* master:
  fix ui/analyse study code duplication
  fix wiki api failure if extract is empty but still present (lichess-org#13893)
  make copy buttons work
  add copy buttons and make all autoselect
  Login from public IPs: Actually check if the user has 2fa enabled
  index all posts, refactor
  scalafmt
  Remove topic if first and only post is deleted
ornicar added a commit that referenced this pull request Nov 1, 2023
* master:
  let tournaments from standard position be rated
  complete renaming to thematicPosition
  fix ui/analyse study code duplication
  fix wiki api failure if extract is empty but still present (#13893)
  make copy buttons work
  add copy buttons and make all autoselect
  Login from public IPs: Actually check if the user has 2fa enabled
  index all posts, refactor
  Scala tweak
  Refactor SeverEval.Merger
  `balancedPosition` -> `thematicPosition`
  Allow thematic tournaments to be rated, if position is balanced
  Remove topic if first and only post is deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Analysis: unexpected wikibook API answer on 1.d4 a5

1 participant