Skip to content

fix: add error notification for sample creation when no sample declaration was found in proposal template#1362

Open
jekabs-karklins wants to merge 3 commits intodevelopfrom
SWAP-1983-esi-bug-if-i-add-a-sample-and-remove-it-i-can-not
Open

fix: add error notification for sample creation when no sample declaration was found in proposal template#1362
jekabs-karklins wants to merge 3 commits intodevelopfrom
SWAP-1983-esi-bug-if-i-add-a-sample-and-remove-it-i-can-not

Conversation

@jekabs-karklins
Copy link
Contributor

@jekabs-karklins jekabs-karklins commented Feb 19, 2026

Description

This PR introduces an error notification for users when attempting to create a sample if no sample declaration was found in the proposal template.

Motivation and Context

This is not a main use case and should ideally never occur. However, if a proposal template is missing a sample declaration, we should handle it gracefully: instead of application throwing a generic error, we display a clear notification explaining that a sample can’t be created and advising the user to contact the User Office. This provides better feedback and reduces confusion in this edge case.

Changes

  • Implemented the use of useSnackbar hook to display an error notification when no sample declaration is found.
  • Added clientLog to report the issue

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/SWAP-1983

@jekabs-karklins jekabs-karklins requested a review from a team as a code owner February 19, 2026 14:24
@jekabs-karklins jekabs-karklins requested review from deepaksftc and removed request for a team February 19, 2026 14:24
@jekabs-karklins
Copy link
Contributor Author

@deepaksftc I have marked this as review:please. Check it at your earlies convenience :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant