I tried castling through check in this preset, and sometimes it was stopped with that same error, but sometimes it was allowed. It seemed to depend on which square was attacked and which piece was attacking, and also whether the king was in check already or not.
When a purely leaping piece was threatening one of the squares the king would pass through, the error occurred. When a diagonal slider could reach the square directly beside the king, castling was allowed.
When a white bishop threatened h9, the black king did not have the option to castle, but when the king was also in check, castling was marked as legal and produced the error as before.
https://www.chessvariants.com/play/pbm/play.php?game=Expanded+Chess&settings=expanded-test
I tried castling through check in this preset, and sometimes it was stopped with that same error, but sometimes it was allowed. It seemed to depend on which square was attacked and which piece was attacking, and also whether the king was in check already or not.
When a purely leaping piece was threatening one of the squares the king would pass through, the error occurred. When a diagonal slider could reach the square directly beside the king, castling was allowed.
When a white bishop threatened h9, the black king did not have the option to castle, but when the king was also in check, castling was marked as legal and produced the error as before.