/**
 * Copyright © 2017 Highpine. All rights reserved.
 *
 * @author    Max Gopey <gopeyx@gmail.com>
 * @copyright 2017 Highpine
 * @license   https://opensource.org/licenses/MIT  MIT License
 */

class ApiError {
    constructor(message) {
        this.message = message;
        this.stack = Error().stack;
    }
    static withStatusCode (statusCode, message) {
        let apiError = new ApiError(message);
        apiError.status = statusCode;
        return apiError;
    };
}

module.exports = ApiError;
@@ -205,16 +205,30 @@
 piError 
+extends Error 
 %7B%0A    co
@@ -240,27 +240,59 @@
 ctor(message
-) %7B
+, id) %7B%0A        super(message, id);
 %0A        thi

Add inheritance from Error for ApiError