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

Show error message when failed to create resource #91

Closed
baelen-git opened this issue Nov 14, 2022 · 1 comment · Fixed by #111
Closed

Show error message when failed to create resource #91

baelen-git opened this issue Nov 14, 2022 · 1 comment · Fixed by #111

Comments

@baelen-git
Copy link
Contributor

See the output of the command below

❯ isctl --config ~/.isctl-ocp2.yaml apply -f vnic_ethif.yaml   
INFO[0000] Performing create operation on new MO (Name: eth0, ClassId: vnic.EthIf) 
FATA[0003] Error while applying MOs: Error executing operation: 400 Bad Request 

I would like to know the reason of the failed API POST. You can get this by enabling verbose mode.

❯ isctl --config ~/.isctl-ocp2.yaml apply -f vnic_ethif.yaml   -v
INFO[0000] Performing create operation on new MO (Name: eth0, ClassId: vnic.EthIf) 
.....
{"code":"InvalidRequest","message":"The request body contains the 'SpVnics' relationship, which is read-only. Do not include read-only relationships in the request body","messageId":"barcelona_request_cannot_modify_read_only_relationships","messageParams":{"1":"SpVnics"},"traceId":"zHDFd14jBvtLVtzIN-wrgUQ1Fo3SG2PVj4KnkT2uMOyYnM2ku0n1Kg=="}
FATA[0002] Error while applying MOs: Error executing operation: 400 Bad Request 

Please grep the message from the response when there is an error and show that message (without enabling verbose mode)

@cgascoig
Copy link
Owner

cgascoig commented Aug 8, 2023

To be fixed in module: cgascoig/intersight-simple-go#1

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 a pull request may close this issue.

2 participants