funktionswerk / hapi-i18n

Translation module for hapi based on mashpie's i18n module
MIT License
39 stars 22 forks source link

Return h.continue instead of response #37

Closed superdav42 closed 3 years ago

superdav42 commented 3 years ago

Returning a response object here halt execution of other plugins that may listen to the onPreResponse event. There is no reason i18n should prevent other plugins from logging 404 or other errors.

I ran into this problem when updating a project from HAPI v16. I worked around it by loading the plugin which listens to 404 errors before hapi-i18n but this PR should fix such problems.

kaywolter commented 3 years ago

Hi David,

Thanks for your contribution.. Is it possible to add a test case that reproduces that issue? I will merge to master and update the npm module then.

Cheers, Kay

kaywolter commented 3 years ago

I added test and published new release :+1: