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

[Raised in Arches] Validation errors don't show in workflow UI #1232

Open
SDScandrettKint opened this issue Jun 13, 2024 · 1 comment
Open
Assignees

Comments

@SDScandrettKint
Copy link
Member

Validation errors aren't shown or prevented in the workflows.

Example:
If we create a designation URL in the Application Area workflow which isn't valid (because it isn't a HTTP/HTTPS URL) then the validation should prevent it from being saved and show a red banner at the top, as it would in the default resource data entry.

However, this error only occurs after the tiles are attempted to be saved, and if this is the case then the UI sort of breaks:
image

and the error is only shown in the backend

2024-06-13 14:42:43,489 arches.app.views.tile ERROR    Unable to save. Please verify your input is valid [Tile id: ]                      [Exception message: TileValidationError: url error, {'url': 'test', 'url_label': 'test'}  - This is not a valid HTTP/HTTPS URL. Unable to save.]                      [Exception trace: Traceback (most recent call last):
  File "/home/samuel/arches_dev/arches_her/arches/arches/app/views/tile.py", line 144, in post
    tile.save(request=request, transaction_id=transaction_id)
  File "/home/samuel/arches_dev/arches_her/arches/arches/app/models/tile.py", line 456, in save
    self.validate([], request=request)
  File "/home/samuel/arches_dev/arches_her/arches/arches/app/models/tile.py", line 350, in validate
    raise TileValidationError(_("{0}".format(error_instance["message"])))
arches.app.models.tile.TileValidationError: "url error, {'url': 'test', 'url_label': 'test'}  - This is not a valid HTTP/HTTPS URL. Unable to save."
]
Internal Server Error: /tile

Validation only occurs on save which is problematic when adding multiple tiles to save all in bulk.

@SDScandrettKint
Copy link
Member Author

Core Arches PR set up here - archesproject/arches#11194

@aj-he aj-he changed the title Validation errors don't show in workflow UI [Raised in Arches] Validation errors don't show in workflow UI Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Is Core Issue
Development

No branches or pull requests

1 participant