Skip to content

PostProcessHandler

Elijah Cobb edited this page Jan 18, 2020 · 2 revisions

A post process handler will be called after an endpoint is finished processing for every endpoint in an endpoint group. For example, if you had an endpoint group called userSecurityEndpointGroup that handled processing security changes on an account in your API, you could define a post process handler that would log the request information.

If you throw an error in a post process handler it will be logged but it will not be sent to the client. Remember, a post process handler has not even started to process until after the response is sent to the client.

Example

endpointGroup.setPostProcessHandler(async(req: HRequest, res: HResponse) => {

});

Pages

element-ts

Element is a group of developer tools I have built in TypeScript. Check them out at: element-ts.com.

About

Author: Elijah Cobb

NPM: @element-ts/hydrogen

Issue Reporting: Github Issues

Clone this wiki locally