Skip to content

Commit

Permalink
capitalize internal server error
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Jan 21, 2024
1 parent 5209cb0 commit 7445919
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/models/error_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { promiseResolve } from "../utils";

export class ErrorHandler {
onServerError(ex: IException): Promise<IHttpResult> {
let errMessage = `<h1>internal server error</h1>
let errMessage = `<h1>Internal Server Error</h1>
<h3>message : ${ex.message}</h3>`;
if (ex.stack) {
errMessage += `<p><b>stacktrace:</b> ${ex.stack}</p>`;
Expand Down
2 changes: 1 addition & 1 deletion tests/general/test/random.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("/random", () => {
request.post('/random/throw').end((err, res) => {
expect(err).to.be.null;
expect(res).to.have.status(500);
expect(removeSpaceAndNewLine(res.text)).to.be.eql('<h1>internalservererror</h1><h3>message:throwtest</h3>');
expect(removeSpaceAndNewLine(res.text)).to.be.eql('<h1>InternalServerError</h1><h3>message:throwtest</h3>');
done();
})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/general/test/wall.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe("wall test", () => {
request.post('/random/throw').end((err, res) => {
expect(err).to.be.null;
expect(res).to.have.status(500);
expect(removeSpaceAndNewLine(res.text)).to.be.eql('<h1>internalservererror</h1><h3>message:throwtest</h3>');
expect(removeSpaceAndNewLine(res.text)).to.be.eql('<h1>InternalServerError</h1><h3>message:throwtest</h3>');

expect(res.body).to.be.an("object");
expect(res).to.have.header('custom-header-from-incoming-wall', '*');
Expand Down

0 comments on commit 7445919

Please sign in to comment.