Skip to content

Comments

IDEV-2299: Validation and error handling improvements#186

Merged
jbabac merged 5 commits intorelease-2.7.0from
IDEV-2299-validation-and-error-handling-improements
Dec 9, 2025
Merged

IDEV-2299: Validation and error handling improvements#186
jbabac merged 5 commits intorelease-2.7.0from
IDEV-2299-validation-and-error-handling-improements

Conversation

@jbabac
Copy link
Contributor

@jbabac jbabac commented Dec 1, 2025

Change(s):

  1. Added RequestValidator to handle validation and error handling

Tests:

  1. UT:
image 2. E2E: image

@jbabac jbabac self-assigned this Dec 1, 2025
@briluza
Copy link
Contributor

briluza commented Dec 5, 2025

Awesome job on this @jbabac .

Question:

  • Should we remove the validations inside the api functions? e.g in iris_investigate
     if not (kwargs or domains):
            raise ValueError("Need to define investigation using kwarg filters or domains")

     if isinstance(active, bool):
            kwargs["active"] = str(active).lower()

*Note (maybe a future enhancement): Should we also do type annotations so that it can help devs or users to see what is expected type in each parameters rather always looking in the openapi spec or using the help()?

@jbabac
Copy link
Contributor Author

jbabac commented Dec 9, 2025

is_body_required

Yes we can.

Awesome job on this @jbabac .

Question:

  • Should we remove the validations inside the api functions? e.g in iris_investigate
     if not (kwargs or domains):
            raise ValueError("Need to define investigation using kwarg filters or domains")

     if isinstance(active, bool):
            kwargs["active"] = str(active).lower()

*Note (maybe a future enhancement): Should we also do type annotations so that it can help devs or users to see what is expected type in each parameters rather always looking in the openapi spec or using the help()?

Yes, we can. This has been addressed already.

@jbabac jbabac changed the base branch from release-2.6.2 to release-2.7.0 December 9, 2025 16:50
@jbabac jbabac merged commit 4e17f06 into release-2.7.0 Dec 9, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants