Feat/error handling on material refresh#995
Feat/error handling on material refresh#995tom-rm-meyer-ISST merged 12 commits intoeclipse-tractusx:mainfrom
Conversation
tom-rm-meyer-ISST
left a comment
There was a problem hiding this comment.
Looks great overall, thanks! Found a few messages to improve consistency.
Further I would refactor to harmonize validations with non-reported entities.
One further question: How have you tested this? I wasn't able to produce an error visible to the frontend but found one in the logs.
I tried manipulated the customer backends db to have a negative demand and then refreshed as a supplier:
docker exec -it postgres-all /bin/sh
psql -d customer-puris -U <see environement for PG_USER>
select * from own_demand
demand_category_code | measurement_unit | quantity | day | partner_uuid | uuid | demand_location_bpns | material_own_material_number | supplier_location_bpns | last_updated_on_date_time
----------------------+------------------+----------+---------------------+--------------------------------------+--------------------------------------+----------------------+------------------------------+------------------------+---------------------------
0 | 0 | 500 | 2025-10-06 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 8e7b9212-46f8-4d56-99bf-911f10dbbdeb | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.253
1 | 0 | 510 | 2025-10-07 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 15a21a49-1a37-4cbb-9c73-4ca306c94fcf | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.601
2 | 0 | 500 | 2025-10-08 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | e71bd1d2-4deb-4031-9ce6-2e3a1e9ba348 | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.733
2 | 0 | 500 | 2025-10-09 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 0f0511ed-8c7e-43d9-8d5f-577b8afa4ada | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.9
2 | 0 | 400 | 2025-10-10 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 2be2e08b-9f00-47a9-bd2a-b2bcc40e858e | BPNS4444444444XX | MNR-7307-AU340474.002 | | 2025-10-06 17:07:39.037
1 | 0 | 810 | 2025-10-17 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 0fd76321-9f5f-432e-8092-4a83b120ce65 | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:42.321
**0 | 0 | 0 | 2025-10-07 22:00:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | ded65399-796e-466f-925f-64088c4208c3 | BPNS4444444444XX | MNR-7307-AU340474.002 | | 2025-10-06 17:24:09.274**
UPDATE own_demand SET quantity = -1 where uuid = 'ded65399-796e-466f-925f-64088c4208c3';
UPDATE 1
puris_customer= commit;
select * from own_demand;
demand_category_code | measurement_unit | quantity | day | partner_uuid | uuid | demand_location_bpns | material_own_material_number | supplier_location_bpns | last_updated_on_date_time
----------------------+------------------+----------+---------------------+--------------------------------------+--------------------------------------+----------------------+------------------------------+------------------------+---------------------------
0 | 0 | 500 | 2025-10-06 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 8e7b9212-46f8-4d56-99bf-911f10dbbdeb | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.253
1 | 0 | 510 | 2025-10-07 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 15a21a49-1a37-4cbb-9c73-4ca306c94fcf | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.601
2 | 0 | 500 | 2025-10-08 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | e71bd1d2-4deb-4031-9ce6-2e3a1e9ba348 | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.733
2 | 0 | 500 | 2025-10-09 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 0f0511ed-8c7e-43d9-8d5f-577b8afa4ada | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:38.9
2 | 0 | 400 | 2025-10-10 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 2be2e08b-9f00-47a9-bd2a-b2bcc40e858e | BPNS4444444444XX | MNR-7307-AU340474.002 | | 2025-10-06 17:07:39.037
1 | 0 | 810 | 2025-10-17 17:07:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | 0fd76321-9f5f-432e-8092-4a83b120ce65 | BPNS4444444444XX | MNR-7307-AU340474.002 | BPNS1234567890ZZ | 2025-10-06 17:07:42.321
**0 | 0 | -1 | 2025-10-07 22:00:00 | b5a7a28c-8d37-4a78-a0b7-9b8746f2ba70 | ded65399-796e-466f-925f-64088c4208c3 | BPNS4444444444XX | MNR-7307-AU340474.002 | | 2025-10-06 17:24:09.274**
Frontend renders fine on both sides. Supplier side has no demands at all.
| ### Added | ||
|
|
||
| - / | ||
| - Added improved error messages for refresh materials ([#995](https://github.com/eclipse-tractusx/puris/pull/995)) |
There was a problem hiding this comment.
Please update to latest changelog version (changed meanwhile) and consider this a major version.
Please also update:
- frontend/package.json
- frontend/package-lock.json
- backend/pom.xml
- charts/Chart.yaml
- charts/README.md
- docs/admin/Migration_Guide
There was a problem hiding this comment.
Please merge main / bump to major version
tom-rm-meyer-ISST
left a comment
There was a problem hiding this comment.
There have been two smaller things left.
I tried it out and it worked fine.
But I detected one issue: We use the same error messages as for the excel import and we can't identify the entry that is matched with the error message. Thus I walked through all error messages and suggested more appropriate error messages.
I would be grateful, if you could adapt them. Please also consider the stock service.
tom-rm-meyer-ISST
left a comment
There was a problem hiding this comment.
There have been two smaller things left.
I tried it out and it worked fine.
But I detected one issue: We use the same error messages as for the excel import and we can't identify the entry that is matched with the error message. Thus I walked through all error messages and suggested more appropriate error messages.
I would be grateful, if you could adapt them. Please also consider the stock service.
There was a problem hiding this comment.
Thanks for updating. The messages allow better tracking of the issue!
I still messed up a lot during the previous review: Some typos and even the bigger issue have been the delivery messages.
There already have been a few faulty messages and I introduced new faults including inconsistent naming. I needed to reiterate this code as it's complex; I noticed that it's more complext than it should be (raised #1025 for potential refactorings).
I created an excel and walked through ALL the delivery validations again to propose a harmonized AND correct message.
delivery-analysis-error-messages.xlsx
Beside that, to not run into issues, I would kindly ask you to
- also add the bpna validations as stated in the spreadsheet as pointed out for the validateReportedResponsibility methods (alternatively you can check if the refactoring makes more sense to you).
- merge main to include this in the minor change.
And big apologies for the moving target and rereview. Have not thought about it all in the beginning + underestimated delivery complexity. Took me 4 hours today.
…error-handling-on-material-refresh
|
Hi Tom! |
tom-rm-meyer-ISST
left a comment
There was a problem hiding this comment.
Thanks for the refactoring and also taking care of the excel!
Found a few smaller things like copy paste issues and one improvement to not confuse the user (forgot about partial in the analysis).
Functionality, works great!
tom-rm-meyer-ISST
left a comment
There was a problem hiding this comment.
LGTM, thanks a lot for iterating over this that intensively.
Following TRG 7.07 an external IP check is recommened. I don't see the need to file the request due to collaboratively iterating over this pr.


Description
Related issue: #985
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: