Skip to content
Compare
Choose a tag to compare
@belgattitude belgattitude released this 14 Jun 19:12
· 1501 commits to main since this release
f76664a

Minor Changes

  • #402 6b945d3 Thanks @belgattitude! - Add field error validation support for 422 HttpUnprocessableEntity

    Example:

    import { HttpUnprocessableEntity } from '@httpx/exception';
    
    const e422 = new HttpUnprocessableEntity({
      errors: [
        {
          message: 'Invalid email',
          path: 'email',
          code: 'invalid_email',
        },
        {
          message: 'Invalid address',
          path: ['addresses', 0, 'line1'],
          code: 'empty_string',
        },
      ],
    });
    
    console.log(e422.errors);

Patch Changes