Skip to content

fix(Global Tagging): add message field to TagResultsItem#326

Merged
pyrooka merged 4 commits intoIBM:mainfrom
stefano-rm:feat/add-message-field
Feb 19, 2026
Merged

fix(Global Tagging): add message field to TagResultsItem#326
pyrooka merged 4 commits intoIBM:mainfrom
stefano-rm:feat/add-message-field

Conversation

@stefano-rm
Copy link
Contributor

@stefano-rm stefano-rm commented Feb 16, 2026

PR summary

Add optional message field to TagResultsItem interface to expose detailed error messages returned by the GhoST Tags API when tagging operations fail.

PR Checklist

  • The commit message follows the Angular Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Current behavior: When a tagging operation fails, the TagResultsItem only contains resource_id and is_error fields. Error details are not exposed to SDK users.

New behavior: The TagResultsItem now includes an optional message field that contains the error message returned by the API, providing better error diagnostics.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Integration and example test

npx jest test/integration/global-tagging.v1.test.js

PASS examples/global-tagging.v1.test.js
  ● Console

    console.log
      createTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:79:5)

    console.log
      {
        "results": [
          {
            "tag_name": "env:example-access-tag",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:71:7)

    console.log
      listTags() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:108:5)

    console.log
      {
        "total_count": 0,
        "offset": 0,
        "limit": 100,
        "items": []
      }

      at console.originalLog (examples/global-tagging.v1.test.js:100:7)

    console.log
      attachTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:139:5)

    console.log
      {
        "results": [
          {
            "resource_id": "crn:v1:bluemix:public:cloudantnosqldb:eu-de:a/3b68e8a86eea0567891d2e83d16d06e0:be534e2b-2531-45b8-993e-ccd683b7753e::",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:131:7)

    console.log
      detachTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:172:5)

    console.log
      {
        "results": [
          {
            "resource_id": "crn:v1:bluemix:public:cloudantnosqldb:eu-de:a/3b68e8a86eea0567891d2e83d16d06e0:be534e2b-2531-45b8-993e-ccd683b7753e::",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:164:7)

    console.log
      deleteTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:205:5)

    console.log
      {
        "results": [
          {
            "provider": "ghost",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:197:7)

    console.log
      deleteTagAll() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:233:5)

    console.log
      {
        "total_count": 0,
        "errors": false,
        "items": []
      }

      at console.originalLog (examples/global-tagging.v1.test.js:225:7)

----------------|---------|----------|---------|---------|-------------------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s             
----------------|---------|----------|---------|---------|-------------------------------
All files       |   94.73 |     80.7 |     100 |    94.7 |                               
 global-tagging |   94.36 |     80.7 |     100 |   94.32 |                               
  v1.ts         |   94.36 |     80.7 |     100 |   94.32 | 77,97,158,236,312,385,473,557 
 lib            |     100 |      100 |     100 |     100 |                               
  common.ts     |     100 |      100 |     100 |     100 |                               
----------------|---------|----------|---------|---------|-------------------------------

Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        3.634 s, estimated 5 s
Ran all test suites matching /examples\/global-tagging.v1.test.js/i.

EXAMPLES TEST

npx jest examples/global-tagging.v1.test.js
PASS examples/global-tagging.v1.test.js
  ● Console

    console.log
      createTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:79:5)

    console.log
      {
        "results": [
          {
            "tag_name": "env:example-access-tag",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:71:7)

    console.log
      listTags() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:108:5)

    console.log
      {
        "total_count": 0,
        "offset": 0,
        "limit": 100,
        "items": []
      }

      at console.originalLog (examples/global-tagging.v1.test.js:100:7)

    console.log
      attachTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:139:5)

    console.log
      {
        "results": [
          {
            "resource_id": "crn:v1:bluemix:public:cloudantnosqldb:eu-de:a/3b68e8a86eea0567891d2e83d16d06e0:be534e2b-2531-45b8-993e-ccd683b7753e::",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:131:7)

    console.log
      detachTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:172:5)

    console.log
      {
        "results": [
          {
            "resource_id": "crn:v1:bluemix:public:cloudantnosqldb:eu-de:a/3b68e8a86eea0567891d2e83d16d06e0:be534e2b-2531-45b8-993e-ccd683b7753e::",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:164:7)

    console.log
      deleteTag() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:205:5)

    console.log
      {
        "results": [
          {
            "provider": "ghost",
            "isError": "false",
            "is_error": false
          }
        ]
      }

      at console.originalLog (examples/global-tagging.v1.test.js:197:7)

    console.log
      deleteTagAll() result:

      at Object.originalLog (examples/global-tagging.v1.test.js:233:5)

    console.log
      {
        "total_count": 0,
        "errors": false,
        "items": []
      }

      at console.originalLog (examples/global-tagging.v1.test.js:225:7)

----------------|---------|----------|---------|---------|-------------------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s             
----------------|---------|----------|---------|---------|-------------------------------
All files       |   94.73 |     80.7 |     100 |    94.7 |                               
 global-tagging |   94.36 |     80.7 |     100 |   94.32 |                               
  v1.ts         |   94.36 |     80.7 |     100 |   94.32 | 77,97,158,236,312,385,473,557 
 lib            |     100 |      100 |     100 |     100 |                               
  common.ts     |     100 |      100 |     100 |     100 |                               
----------------|---------|----------|---------|---------|-------------------------------

Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        3.634 s, estimated 5 s
Ran all test suites matching /examples\/global-tagging.v1.test.js/i.

  • Related to (IBM) task #29830
  • Changes are minimal: only adds the message?: string field to the interface
  • The field is optional and backward compatible
  • Swagger definition has been updated and merged in the ghost-for-resources repository

Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
@pyrooka pyrooka self-requested a review February 17, 2026 10:43
@pyrooka pyrooka changed the title feat(Tagging): regenerated services with latest API definition fix(Global Tagging): add message field to TagResultsItem Feb 17, 2026
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

A few things to change before approving, but it looks good overall.
Also, please provide evidence of a clean integration and examples test run.

Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
@stefano-rm
Copy link
Contributor Author

stefano-rm commented Feb 17, 2026

test
see "Other information" session for Integratione and examples test

@stefano-rm stefano-rm requested a review from pyrooka February 17, 2026 13:39
Signed-off-by: Stefano Roberto Mollica <stefano.mollica@it.ibm.com>
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

LGTM!

@pyrooka pyrooka merged commit 5be967a into IBM:main Feb 19, 2026
8 checks passed
ibm-devx-sdk pushed a commit that referenced this pull request Feb 19, 2026
## [0.81.2](v0.81.1...v0.81.2) (2026-02-19)

### Bug Fixes

* **Global Tagging:** add `message` field to `TagResultsItem` ([#326](#326)) ([5be967a](5be967a))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.81.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants