diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index dea22e6fd..c00979bab 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.5.5", + "version": "2.5.6", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/sandbox.ts b/packages/hydrojudge/src/sandbox.ts index 405dbb3ba..6c066adaf 100644 --- a/packages/hydrojudge/src/sandbox.ts +++ b/packages/hydrojudge/src/sandbox.ts @@ -98,6 +98,7 @@ export async function runMultiple(execute) { res = await axios.post('/run', body); if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data)); } catch (e) { + if (e instanceof FormatError) throw e; throw new SystemError('Sandbox Error'); } return await Promise.all(res.data.map((i) => adaptResult(i, {}))); @@ -121,6 +122,7 @@ export async function run(execute, params?) { if (argv['show-sandbox-call']) logger.debug('%d %s', id, JSON.stringify(res.data)); [result] = res.data; } catch (e) { + if (e instanceof FormatError) throw e; // FIXME request body larger than maxBodyLength limit throw new SystemError('Sandbox Error', e.message); }