diff --git a/third_party/astrolabe/src/App.vue b/third_party/astrolabe/src/App.vue index ac98bf6..7c646bf 100644 --- a/third_party/astrolabe/src/App.vue +++ b/third_party/astrolabe/src/App.vue @@ -615,7 +615,20 @@ export default { } } catch (err) { console.error('Search error:', err) - this.error = this.t('astrolabe', 'Network error. Please try again.') + // Check if this is an HTTP error with a response + if (err.response && err.response.data && err.response.data.error) { + // Use the specific error message from the backend + this.error = err.response.data.error + } else if (err.response && err.response.status === 401) { + // Unauthorized - user needs to authorize the app + this.error = this.t('astrolabe', 'Authorization required. Please complete Step 1 in Settings → Astrolabe.') + } else if (err.response && err.response.status === 503) { + // Service unavailable - MCP server not reachable + this.error = this.t('astrolabe', 'Search service unavailable. Please try again later.') + } else { + // Actual network error or unknown error + this.error = this.t('astrolabe', 'Network error. Please try again.') + } this.results = [] } finally { this.loading = false @@ -637,7 +650,14 @@ export default { } } catch (err) { console.error('Status error:', err) - this.statusError = this.t('astrolabe', 'Network error. Please try again.') + // Extract error message from response if available + if (err.response && err.response.data && err.response.data.error) { + this.statusError = err.response.data.error + } else if (err.response && err.response.status === 401) { + this.statusError = this.t('astrolabe', 'Authorization required. Please complete Step 1 in Settings → Astrolabe.') + } else { + this.statusError = this.t('astrolabe', 'Network error. Please try again.') + } } finally { this.statusLoading = false }