UNPKG

@backstage/backend-plugin-api

Version:

Core API used by Backstage backend plugins

10 lines (7 loc) 400 B
'use strict'; function isDatabaseConflictError(e) { const message = e?.message; return typeof message === "string" && (/SQLITE_CONSTRAINT(?:_UNIQUE)?: UNIQUE/.test(message) || /UNIQUE constraint failed:/.test(message) || /unique constraint/.test(message) || /Duplicate entry/.test(message)); } exports.isDatabaseConflictError = isDatabaseConflictError; //# sourceMappingURL=database.cjs.js.map