Skip to content

Conversation

gomezbc
Copy link
Contributor

@gomezbc gomezbc commented Mar 20, 2025

Description

This PR fixes DTR service not 2XX responses.

In the AAS spec definition, if a request is not succesful (not 2XX), the service is spected to return a message containing details about the failure.
An error should only be raised if it's network related

In our current implementation instead of returning this meesage, we raise an error if the DTR response is not 2XX, returning an 500 status code instead of the DTR message.

Screenshot from 2025-03-20 14-34-12
Screenshot from 2025-03-20 14-34-36

As our service doesn't implement any business logic to handle the requests, it should resturn the response instead of a misleading 500 response.

This PR fixes the issue returning that message.
Screenshot from 2025-03-20 14-32-55

@mgarciaLKS PR #55 might need some adjustment to implement this fix

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@gomezbc gomezbc added bug Something isn't working industry-sdk python Pull requests that update python code labels Mar 20, 2025
Copy link

Copy link
Contributor

@matbmoser matbmoser left a comment

Choose a reason for hiding this comment

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

LGTM

@matbmoser matbmoser merged commit 0754ab6 into eclipse-tractusx:main Mar 20, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working industry-sdk python Pull requests that update python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants