The 502 Bad Gateway
response code means that the server received an invalid response while working as a gateway to handle the response.
Field | Type | Description | Default |
---|---|---|---|
message |
string | The representative message for this error. | empty |
options |
ExceptionOptions | A detailed message of this error |
import { BadGatewayException } from 'custom-error-service';
import express from 'express';
const app = express();
app.get('/', (request, response) => {
try {
throw new BadGatewayException();
} catch (error) {
handleError(error);
}
});
import { BadGatewayException } from 'custom-error-service';
import express from 'express';
const app = express();
app.get('/', (request, response) => {
try {
throw new BadGatewayException('Test Error');
} catch (error) {
handleError(error);
}
});
© Copyright 2019-present - Customer Error Service by Isidro A. Lopez G.