note-connector 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/py/pyproject.toml +1 -1
- package/py/src/note_mcp/api/images.py +11 -0
package/package.json
CHANGED
package/py/pyproject.toml
CHANGED
|
@@ -244,6 +244,17 @@ async def _upload_image_internal(
|
|
|
244
244
|
async with NoteAPIClient(session) as client:
|
|
245
245
|
response = await client.post(endpoint, files=files, data=data)
|
|
246
246
|
|
|
247
|
+
# Check for API-level error response
|
|
248
|
+
if "error" in response and not response.get("data"):
|
|
249
|
+
error_message = response.get("error", "unknown error")
|
|
250
|
+
if isinstance(error_message, dict):
|
|
251
|
+
error_message = error_message.get("message", str(error_message))
|
|
252
|
+
raise NoteAPIError(
|
|
253
|
+
code=ErrorCode.UPLOAD_FAILED,
|
|
254
|
+
message=f"画像アップロードに失敗しました: {error_message}",
|
|
255
|
+
details={"note_id": numeric_note_id, "response": response},
|
|
256
|
+
)
|
|
257
|
+
|
|
247
258
|
# Debug: log full API response for investigation
|
|
248
259
|
logger.debug(
|
|
249
260
|
"Image upload response for note_id=%s, endpoint=%s: %s",
|