PHP 8.2.30
Preview: app-error.js Size: 994 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/backend/utils/errors/app-error.js

import { ErrorTypeEnum } from '../../../utils/error-type.enum.js';
/**
 * Error which can be thrown by developer in custom actions/hooks/components
 *
 * @category Errors
 */
export class AppError extends Error {
  /**
   * HTTP Status code, defaults to 400
   */

  /**
   * Base error message and type which is stored in the record
   */

  /**
   * Any custom message which should be seen in the UI
   */

  /**
   * Any additional error information
   */

  /**
   * Any additional notice configuration to show in UI
   */

  /**
   * @param {string} message    a message to be shared with the client
   * @param {string} data       additional data to be shared with the client
   */
  constructor(message, data, notice) {
    super(message);
    this.statusCode = 400;
    this.baseMessage = message;
    this.baseError = {
      message,
      type: ErrorTypeEnum.App
    };
    this.data = data;
    this.notice = notice;
    this.name = ErrorTypeEnum.App;
  }
}
export default AppError;

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
994 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
764 B lrw-r--r-- 2026-02-28 00:31:26
Edit Download
815 B lrw-r--r-- 2026-02-28 00:31:34
Edit Download
267 B lrw-r--r-- 2026-02-28 00:31:42
Edit Download
1.05 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
872 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download
10 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download
967 B lrw-r--r-- 2026-02-28 00:31:52
Edit Download

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