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

Cannot create a transaction through the generic transaction API #3909

Open
jmiranda opened this issue Mar 10, 2023 · 0 comments
Open

Cannot create a transaction through the generic transaction API #3909

jmiranda opened this issue Mar 10, 2023 · 0 comments

Comments

@jmiranda
Copy link
Member

Request

curl -b cookies.txt -X POST -H "Content-Type: application/json" \
-d '{"transactionDate": "03/10/2023 00:00:00", "transactionType": "9", "inventory": "1", "destination":"1"}' \ 
https://openboxes.ngrok.io/openboxes/api/generic/transaction

Response

{
	"errorCode": 400,
	"errorMessage": "Validation error. Cannot create product due to validation errors:\n- Field error in object 'org.pih.warehouse.inventory.Transaction' on field 'inventory': rejected value [1]; codes [typeMismatch.org.pih.warehouse.inventory.Transaction.inventory,typeMismatch.inventory,typeMismatch.org.pih.warehouse.inventory.Inventory,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [org.pih.warehouse.inventory.Transaction.inventory,inventory]; arguments []; default message [inventory]]; default message [Failed to convert property value of type 'java.lang.Integer' to required type 'org.pih.warehouse.inventory.Inventory' for property 'inventory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.Integer] to required type [org.pih.warehouse.inventory.Inventory] for property 'inventory': no matching editors or conversion strategy found]\n",
	"errorMessages": ["Failed to convert property value of type java.lang.Integer to required type org.pih.warehouse.inventory.Inventory for property inventory; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.Integer] to required type [org.pih.warehouse.inventory.Inventory] for property inventory: no matching editors or conversion strategy found"]
}```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant