We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tbreeding/jira-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
errorMessageUtils.ts•770 B
/**
* Error message utilities for Jira API
*
* This file contains helper functions for handling and formatting error messages
* from Jira API responses.
*/
/**
* Extracts error message from an API error response
* @param errorData The error data object returned from the API
* @param status The HTTP status code
* @returns Formatted error message string
*/
export function getErrorMessage(errorData: { errorMessages?: string[] }, status: number): string {
// Check if errorData has errorMessages array
if (Array.isArray(errorData.errorMessages) && errorData.errorMessages.length > 0) {
return `Error: ${errorData.errorMessages[0]}, Status: ${status}`
}
// For backward compatibility with tests
return `Failed to fetch Jira issue. Status: ${status}`
}