Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle each error with special message for user to understand the situation. #45

Open
Konard opened this issue Jan 16, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Konard
Copy link
Member

Konard commented Jan 16, 2025

Prompt

draw an oak cedar bell dick

Result

{
  "task_id": "6b17484e-93ae-40a0-9a16-014ba1f9cbbc",
  "model": "midjourney",
  "task_type": "imagine",
  "status": "failed",
  "config": {
    "service_mode": "public",
    "webhook_config": {
      "endpoint": "",
      "secret": ""
    }
  },
  "input": null,
  "output": {
    "image_url": "",
    "image_urls": null,
    "temporary_image_urls": null,
    "discord_image_url": "",
    "actions": [],
    "progress": 0,
    "intermediate_image_urls": null
  },
  "meta": {
    "created_at": "2025-01-16T13:53:26Z",
    "started_at": "0001-01-01T00:00:00Z",
    "ended_at": "2025-01-16T13:53:26Z",
    "usage": {
      "type": "point",
      "frozen": 700000,
      "consume": 0
    },
    "is_using_private_pool": false,
    "model_version": "unknown",
    "process_mode": "relax",
    "failover_triggered": false
  },
  "detail": null,
  "logs": [],
  "error": {
    "code": 10000,
    "raw_message": "Banned Prompt: dick",
    "message": "failed to check prompt",
    "detail": null
  }
}

Should result in message like this:

"dick" is banned prompt by MidJourney, please try another prompt.
@Konard Konard added the enhancement New feature or request label Jan 16, 2025
@Konard
Copy link
Member Author

Konard commented Feb 1, 2025

Another prompt:

Raged beast with human flesh
{
  "task_id": "26674fea-2fdb-4cf2-85de-b8017c5a351a",
  "model": "midjourney",
  "task_type": "imagine",
  "status": "failed",
  "config": {
    "service_mode": "public",
    "webhook_config": {
      "endpoint": "",
      "secret": ""
    }
  },
  "input": null,
  "output": {
    "image_url": "",
    "image_urls": null,
    "temporary_image_urls": null,
    "discord_image_url": "",
    "actions": [],
    "progress": 0,
    "intermediate_image_urls": null
  },
  "meta": {
    "created_at": "2025-02-01T15:34:59Z",
    "started_at": "0001-01-01T00:00:00Z",
    "ended_at": "2025-02-01T15:34:59Z",
    "usage": {
      "type": "point",
      "frozen": 700000,
      "consume": 0
    },
    "is_using_private_pool": false,
    "model_version": "unknown",
    "process_mode": "relax",
    "failover_triggered": false
  },
  "detail": null,
  "logs": [],
  "error": {
    "code": 10000,
    "raw_message": "Banned Prompt: flesh",
    "message": "failed to check prompt",
    "detail": null
  }
}

@Konard
Copy link
Member Author

Konard commented Feb 7, 2025

{
  "task_id": "48bace64-2996-41bd-9b98-a5b8a29b683f",
  "model": "midjourney",
  "task_type": "imagine",
  "status": "failed",
  "config": {
    "service_mode": "public",
    "webhook_config": {
      "endpoint": "",
      "secret": ""
    }
  },
  "input": null,
  "output": {
    "image_url": "",
    "image_urls": null,
    "temporary_image_urls": null,
    "discord_image_url": "",
    "actions": [],
    "progress": 0,
    "intermediate_image_urls": null
  },
  "meta": {
    "created_at": "2025-02-06T14:58:38Z",
    "started_at": "0001-01-01T00:00:00Z",
    "ended_at": "2025-02-06T14:58:38Z",
    "usage": {
      "type": "point",
      "frozen": 700000,
      "consume": 0
    },
    "is_using_private_pool": false,
    "model_version": "unknown",
    "process_mode": "relax",
    "failover_triggered": false
  },
  "detail": null,
  "logs": [],
  "error": {
    "code": 10000,
    "raw_message": "Banned Prompt: succubus",
    "message": "failed to check prompt",
    "detail": null
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant