Skip to content

Commit

Permalink
DTL response null result with 404 http status DEMO code
Browse files Browse the repository at this point in the history
  • Loading branch information
shidaxi committed Dec 22, 2023
1 parent 79fb4a5 commit 867ec53
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/data-transport-layer/src/services/server/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,13 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
this.state.app[method](route, async (req, res) => {
const start = Date.now()
try {
// const [json, httpCode] = await handler(req, res)
let httpCode = HttpCodes.OK, json;
console.log(httpCode);
const result = await handler(req, res)
if(Array.isArray(result)) {
[json, httpCode] = result;
} else {
json = result;
}
console.log(httpCode);
const elapsed = Date.now() - start
this.logger.info('Served HTTP Request', {
method: req.method,
Expand Down

0 comments on commit 867ec53

Please sign in to comment.