toolkit 1.0.1

This commit is contained in:
2026-10-09 10:43:20 -04:00
parent e814569a07
commit ebd3474db3
363 changed files with 3330238 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
const stringifyError = (error = {}) => {
return JSON.stringify(error, Object.getOwnPropertyNames(error))
}
const potionErrorObj = (error = {}, details = {}) => {
const stringifiedError = stringifyError(error)
const stringifiedObject = JSON.stringify({
error: stringifiedError,
details,
})
return stringifiedObject
}
module.exports = { potionErrorObj, stringifyError }