hapi-openapi icon indicating copy to clipboard operation
hapi-openapi copied to clipboard

fix: validator throws 422 with message

Open thebrownfox opened this issue 3 years ago • 5 comments

As mentioned in #168 the error response tell little to nothing.

There are 2 possible solutions:

  1. Patch it here and add Boom with right (I guess the right one is 422) statusCode
  2. Patch hapi. From the line I patched is the error thrown and processed here and follows here where it throws error without the details for what ever reason. Even if it will be done in hapi, we won't have statusCode: 422.

thebrownfox avatar Apr 22 '21 15:04 thebrownfox

do you think you could separate the style changes from this PR @thefoxie even if they are justified, they need to be addressed on a different PR

dcharbonnier avatar Apr 26 '21 09:04 dcharbonnier

@dcharbonnier It was changed by eslint automatically. I could do that for sure.

thebrownfox avatar Apr 26 '21 10:04 thebrownfox

@dcharbonnier like this?

thebrownfox avatar Apr 26 '21 10:04 thebrownfox

no @thefoxie as you can see, there is plenty of unrelated differences here https://github.com/krakenjs/hapi-openapi/pull/191/files

dcharbonnier avatar May 27 '21 08:05 dcharbonnier

Waiting to remove style changes.

tlivings avatar Jun 02 '21 20:06 tlivings