Skip to content

Conversation

@kzscisoft
Copy link
Collaborator

Fix Invalid Arguments being sent to Server

Issue: N/A

Python Version(s) Tested: 3.14

Operating System(s): Ubuntu 24.05

📝 Summary

The server now forbids unrecognised arguments in requests, the Python API until this point was sending such arguments.

🔍 Diagnosis

Error 422 now sent by server. Due to the way the LLAPI works arguments are provided at a single level whereas the server uses nested arguments for, e.g. alerts. Until now all arguments were sent to the server and the extra ignored but now the server will throw an error.

🔄 Changes

Patched by adding an internal attribute to SimvueObject which lists which keys/attributes present in the staging for the class instance should not be sent to the server.

✔️ Checklist

  • Unit and integration tests passing.
  • Pre-commit hooks passing.
  • Quality checks passing.

@kzscisoft kzscisoft added this to the Simvue Python API v2.3 milestone Oct 21, 2025
@kzscisoft kzscisoft requested a review from wk9874 October 21, 2025 06:10
@kzscisoft kzscisoft self-assigned this Oct 21, 2025
@kzscisoft kzscisoft added bug Something isn't working python Pull requests that update python code labels Oct 21, 2025
@kzscisoft kzscisoft force-pushed the hotfix/fix-extra-args-in-restapi-calls branch from dda91e2 to 68223a1 Compare October 21, 2025 06:12
Copy link
Collaborator

@wk9874 wk9874 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kzscisoft kzscisoft merged commit e8767d1 into dev Oct 21, 2025
20 checks passed
@kzscisoft kzscisoft deleted the hotfix/fix-extra-args-in-restapi-calls branch October 21, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants