Handling Service Error with OCI CLI can be a bit cumbersome but still possible.
Let's take the following example:
$ response=$(oci os object put -ns my-ns -bn my-bucket --file my-file --query etag --raw-output)
Uploading object [####################################] 100%ServiceError:
{
"code": "BucketNotFound",
"message": "Either the bucket named 'my-bucket' does not exist in the namespace 'my-ns' or you are not authorized to access it",
"opc-request-id": "fra-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",