PHP 8.2.30
Preview: error.js Size: 436 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/flutterwave-node-v3/utils/error.js

const { errorLog } = require('./logger');

class validationError extends Error {
  constructor(message) {
    super(message);
    this.name = this.constructor.name;
    Error.captureStackTrace(this, this.constructor);
  }
}

const getErrorMessage = (err) => {
  if (err instanceof validationError) {
    return err.message;
  } else {
    errorLog.error(err.message, err);
  }
};

module.exports = { validationError, getErrorMessage };

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
1.29 KB lrw-r--r-- 2026-02-21 00:53:34
Edit Download
436 B lrw-r--r-- 2026-02-21 00:53:38
Edit Download
817 B lrw-r--r-- 2026-02-21 00:53:38
Edit Download
350 B lrw-r--r-- 2026-02-21 00:54:22
Edit Download
316 B lrw-r--r-- 2026-02-21 00:54:24
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).