Skip to content

refactor: remove error re-exports in jtk #22

@rianjs

Description

@rianjs

Summary

Remove unnecessary error re-exports in jtk's API package - callers can import the shared errors package directly.

Current State

tools/jtk/api/errors.go re-exports shared errors:

var (
    ErrNotFound     = sharederrors.ErrNotFound
    ErrUnauthorized = sharederrors.ErrUnauthorized
    ErrForbidden    = sharederrors.ErrForbidden
    ErrBadRequest   = sharederrors.ErrBadRequest
    ErrServerError  = sharederrors.ErrServerError
    ErrRateLimited  = sharederrors.ErrRateLimited
)

func IsNotFound(err error) bool {
    return sharederrors.IsNotFound(err)
}
func IsUnauthorized(err error) bool {
    return sharederrors.IsUnauthorized(err)
}
func IsRateLimited(err error) bool {
    return sharederrors.IsRateLimited(err)
}

Proposed Changes

  1. Remove re-exported error variables and functions
  2. Keep only tool-specific errors: ErrIssueKeyRequired, ErrProjectKeyRequired
  3. Update callers to import github.com/open-cli-collective/atlassian-go/errors directly

Impact

~20 lines removed, 1 file changed, callers updated to use shared package

Benefits

  • Less indirection
  • Clearer dependency on shared package
  • Easier to maintain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions