skewten-incubator / pcb

Middleware-based API framework - It's Koa, but for APIs.
0 stars 0 forks source link

Differentiating between code errors and response errors #7

Open SEAPUNK opened 8 years ago

SEAPUNK commented 8 years ago

Should be utilize pseudo-HTTP status codes? This way, if there's an expected problem, they can do ctx.throw, and specify the message, and/or code.

This will put the direct adapter to better use, and ease the pain of developing other adapters, but complicate responses.