profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/erfanium/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Erfan Safari erfanium Home, my dream company erfanium.ir

erfanium/fv-document-generator 4

Document generator for `fastest validator`

erfanium/fastify-fv 3

Fastify plugin to support fastest-validator

erfanium/fastify-telegraf 3

Fastify plugin to handle Telegraf webhook

erfanium/deno-objectId 1

Native bson objectId implementation for Deno

erfanium/excalidraw 1

Virtual whiteboard for sketching hand-drawn like diagrams

erfanium/find-my-way-deno 1

A crazy fast HTTP router for Deno (WIP)

erfanium/abstract-client 0

This is my personal standard to create HTTP API clients

erfanium/agenda 0

Lightweight job scheduling for Node.js

erfanium/avvio 0

Asynchronous bootstrapping of Node applications

erfanium/btw-frontend 0

A took like crisp for creating conversational robots, with all telegram bot features

startedgogs/gogs

started time in 12 hours

startedgo-gitea/gitea

started time in a day

created tagerfanium/page_iter

tagv1.0.0

Iterate through paginated api results for Deno

created time in a day

release erfanium/page_iter

v1.0.0

released time in a day

issue commenticebob/fastest-validator

Bug with type objectID

objectID rule will be removed in next major version (see #252) So better implement your custom rule for objectId. it's easy

mercuryskies

comment created time in a day

push eventerfanium/page_iter

ERFANIUM

commit sha 32be2ccc1574313c24a452be75f6518d7800473b

init

view details

push time in a day

create barncherfanium/page_iter

branch : main

created branch time in a day

created repositoryerfanium/page_iter

Iterate through paginated api results for Deno

created time in a day

startedponnamkarthik/FlutterToast

started time in 3 days

issue commenticebob/fastest-validator

custom error objects

I'm not a express user, but something like this should work

app.use((req , res, next) => {
   if (req.statusCode !== 400) return next();
   req.body = {...}
   next();
})
higoka

comment created time in 4 days

issue commenticebob/fastest-validator

custom error objects

can you give a quick example how im not sure how i can implement that in a middleware

Which framework you are using?

higoka

comment created time in 4 days

issue commenticebob/fastest-validator

custom error objects

Just create your custom middleware for errors. This is not something that concerns us

higoka

comment created time in 4 days

pull request commentdenodrivers/deno_mongo

Fixing oversight in example.

It doesn't return a promise https://github.com/denodrivers/deno_mongo/blob/main/src/client.ts#L55-L58

DodoTheDeveloper

comment created time in 4 days

delete branch erfanium/native_http

delete branch : e1

delete time in 4 days

PR opened cmorten/native_http

fix: add missing error handler

Issue

Fixes #4

CheckList

  • [x] PR starts with [#ISSUE_ID].
  • [x] Has been tested (where required).
+56 -3

0 comment

3 changed files

pr created time in 4 days

create barncherfanium/native_http

branch : e1

created branch time in 4 days

fork erfanium/native_http

Native Deno HTTP client and server implementations

fork in 4 days

issue commentcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

@cmorten Great, Thanks! I'm working on it

erfanium

comment created time in 4 days

startedaslrousta/juju

started time in 4 days

issue commentcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

@cmorten Should I create a PR?

erfanium

comment created time in 4 days

issue commentcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

Listening on port 4505.
error: Uncaught (in promise) Http: connection closed before message completed
      await serverRequest.done;
      ^
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
    at async Server.iterateHttpRequests (file:///home/erfanium/Documents/native_http/server.ts:159:7)
    at async Server.acceptConnAndIterateHttpRequests (file:///home/erfanium/Documents/native_http/server.ts:223:5)
    at async MuxAsyncIterator.callIteratorNext (https://deno.land/std@0.101.0/async/mux_async_iterator.ts:30:31)
erfanium

comment created time in 4 days

issue commentcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

Another logs

Listening on port 3003.
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
error: Uncaught (in promise) Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)

erfanium

comment created time in 4 days

issue commentcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

Here is my logs

Listening on port 3003.
Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)
error: Uncaught (in promise) Http: connection closed before message completed
    at deno:core/01_core.js:106:46
    at unwrapOpResult (deno:core/01_core.js:126:13)
    at async Object.respondWith (deno:extensions/http/01_http.js:183:27)

erfanium

comment created time in 4 days

issue openedcmorten/native_http

Uncaught (in promise) Http: connection closed before message completed

Issue

Setup:

  • Deno version: 1.12.2
  • v8 version: 9.2.230.14
  • Typescript version: 4.3.5

Details

My code:

import { listenAndServe } from "https://deno.land/x/native_http@0.3.1/mod.ts";

const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

listenAndServe(3003, async (requestEvent) => {
  await delay(50);
  const body = "Hi";
  requestEvent.respondWith(new Response(body, { status: 200 })).catch((e) => {
    console.error(e);
  });
});

console.log("Listening on port 3003.");

Even I catch that rejection, I still get uncaught promise error and it will kills the process.

to reported, I use autocannon

autocannon localhost:3003 -w 4

created time in 4 days

delete branch erfanium/deno_mongo

delete branch : e2

delete time in 8 days

PR opened denodrivers/deno_mongo

fix(client): use connection db option as default database name

Expected behavior from https://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#db

+14 -3

0 comment

2 changed files

pr created time in 8 days

create barncherfanium/deno_mongo

branch : e2

created branch time in 8 days

delete branch erfanium/deno_mongo

delete branch : e1

delete time in 8 days