Skip to content

TAXENGG-2901 (fix): Tax SPI Spec changes on address validation#52

Open
cb-adityabhat wants to merge 1 commit intomainfrom
fix/TAXENGG-2901
Open

TAXENGG-2901 (fix): Tax SPI Spec changes on address validation#52
cb-adityabhat wants to merge 1 commit intomainfrom
fix/TAXENGG-2901

Conversation

@cb-adityabhat
Copy link
Contributor

Invalid address response should be returned as 400 only, not 200

Comment on lines +2617 to +2627
errors:
- code: INVALID_DATA
message: Invalid address provided.
entity: Address
CheckAddressTaxabilityBadRequestResponse:
summary: Bad Request address check taxability response
description: The request provided for check taxability was Invalid/contained invalid data
value:
errors:
- code: INVALID_DATA
message: Empty address provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

in the 400 response example we should add invalid address example.

Copy link
Contributor Author

@cb-adityabhat cb-adityabhat Nov 11, 2024

Choose a reason for hiding this comment

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

line 2618 to 2620 is invalid address example.
Do you mean an example of an invalid addreess?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't agree with 400 error code,

because -> The api is to validate address, and if api is sucessfull it should return 200

now the address invalid is part of the successful api call of this api only..

400 is when the api itself fails because of invalid input !

Comment on lines +2617 to +2627
errors:
- code: INVALID_DATA
message: Invalid address provided.
entity: Address
CheckAddressTaxabilityBadRequestResponse:
summary: Bad Request address check taxability response
description: The request provided for check taxability was Invalid/contained invalid data
value:
errors:
- code: INVALID_DATA
message: Empty address provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't agree with 400 error code,

because -> The api is to validate address, and if api is sucessfull it should return 200

now the address invalid is part of the successful api call of this api only..

400 is when the api itself fails because of invalid input !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants