mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-07 06:25:21 +02:00
fix: replace exiting loop to throwing exception
This commit is contained in:
parent
73f10cc811
commit
b445414098
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import Page, { PageData } from '../models/page';
|
||||||
import Alias from '../models/alias';
|
import Alias from '../models/alias';
|
||||||
import PagesOrder from './pagesOrder';
|
import PagesOrder from './pagesOrder';
|
||||||
import PageOrder from '../models/pageOrder';
|
import PageOrder from '../models/pageOrder';
|
||||||
|
import HttpException from "../exceptions/httpException";
|
||||||
|
|
||||||
type PageDataFields = keyof PageData;
|
type PageDataFields = keyof PageData;
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ class Pages {
|
||||||
*/
|
*/
|
||||||
while (orphanPageOrder.length > 0) {
|
while (orphanPageOrder.length > 0) {
|
||||||
if (count >= 1000) {
|
if (count >= 1000) {
|
||||||
break;
|
throw new HttpException(500, `Page cannot be processed`);
|
||||||
}
|
}
|
||||||
|
|
||||||
orphanPageOrder.forEach((orphanOrder, idx) => {
|
orphanPageOrder.forEach((orphanOrder, idx) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue