Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Bad Request from API when creating a watch with browser steps #2898

Open
birukoff opened this issue Jan 11, 2025 · 3 comments
Open

400 Bad Request from API when creating a watch with browser steps #2898

birukoff opened this issue Jan 11, 2025 · 3 comments
Assignees
Labels

Comments

@birukoff
Copy link

birukoff commented Jan 11, 2025

Describe the bug
When creating a watch via an API call to POST /api/v1/watch, or updating a watch via PUT /api/v1/watch/:uuid, if the JSON body contains non-empty "browser_steps":[...] array, the API responds with 400 Bad Request due to validation error. The body claims that items in the "browser_steps" array must be of type "String". Apparently, JSON schema is not correct.

Version
0.48.06

How did you install?
Docker

To Reproduce
Steps to reproduce the behavior:

  1. Fetch a JSON of an existing watch that contains browser steps using GET /api/v1/watch/:uuid.
  2. Set to null unnecessary properties like "uuid", "date_created", "content-type".
  3. Create a new watch using POST /api/v1/watch and the JSON from step 2.
  4. See error response.
  5. Remove "browser_steps" property or set it to empty array from the JSON.
  6. Create a new watch using POST /api/v1/watch.
  7. See success.

Expected behavior
200 Success

@dgtlmoon
Copy link
Owner

thanks for the solid report!

@dgtlmoon
Copy link
Owner

Any chance you can attach a copy of the JSON you are sending?

@birukoff
Copy link
Author

Sure
test_watch.json
The JSON contains browser steps (fetched from a real existing watch). Import it as is to see the error. Replace with empty array to see success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants