fix: report resource conflicts and accurate CLI API errors

This commit is contained in:
whyour
2026-10-01 11:26:40 +08:00
parent a5406bedca
commit 06c8d8b112
7 changed files with 199 additions and 29 deletions
+2
View File
@@ -14,6 +14,7 @@ import { AuthInfo } from '../data/system';
import path from 'path';
import { t } from '../shared/i18n';
import { AppScope } from '../data/open';
import uniqueConstraintError from '../middlewares/uniqueConstraintError';
import protectedPathCase from '../middlewares/protectedPathCase';
function resolveTrustProxy(value = process.env.QL_TRUST_PROXY) {
@@ -190,6 +191,7 @@ export default ({ app }: { app: Application }) => {
});
app.use(errors());
app.use(uniqueConstraintError);
app.use(
(