netresearch/jira-skill / skills/jira-communication
jira-communication
FlaggedUse when handling Jira issues, sprints, boards, links, fields, worklogs, attachments, or users, or on any Jira intent without a key ("create/find a ticket", "pick a project"). Auto-triggers on Jira URLs and issue keys (PROJ-123). Also use when MCP Atlassian tools fail or are unavailable for Jira Server/DC.
scripts/lib/errors.py
View on GitHub# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Netresearch DTT GmbH
"""Typed Jira transport errors and error-message sanitization.
Lives in its own module so that both ``lib.client`` (which raises these from
its patched session) and ``lib.users`` (which must let them propagate instead
of misreporting them as "unknown user") can import them without an import
cycle. ``lib.client`` re-exports every name for existing importers.
"""
import re
class CaptchaError(Exception):
"""Error raised when Jira requires CAPTCHA resolution.
This happens when Jira Server/DC detects suspicious login activity
and requires the user to complete a CAPTCHA challenge in the web UI.
"""
def __init__(self, message: str, login_url: str):
super().__init__(message)
self.login_url = login_url
class AuthenticationError(Exception):
"""Raised when Jira returns 401 or 403 on an authenticated request.
Provides a typed alternative to inspecting raw HTTP status codes or
string-matching error messages for authentication failures.
"""
def _sanitize_error(message: str) -> str:
"""Remove potential credential fragments from error messages.
Uses regex to redact values after sensitive keys, rather than a simple
denylist check that discards the entire message.
"""
# Redact values following sensitive keys (e.g., "token=abc123" → "token=***")
# First handle "Authorization: <scheme> <token>" as a single unit
sanitized = re.sub(
r"(authorization:\s*)\S+(?:\s+\S+)?",
r"\1***",
message,
flags=re.IGNORECASE,
)
sanitized = re.sub(
r"(bearer |basic |token=|password=|api_token=|api_key=|secret=|access_token=|private_token=|apikey=|auth_token=)\S+",
r"\1***",
sanitized,
flags=re.IGNORECASE,
)
return sanitized
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |