mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 20:26:34 +01:00
better error handling from venvs
This commit is contained in:
@@ -116,9 +116,9 @@ class ImageGenerationDALLE(DVMTaskInterface):
|
||||
return result
|
||||
|
||||
except Exception as e:
|
||||
print("Error in Module")
|
||||
raise Exception(e)
|
||||
|
||||
if str(e).startswith("Error code: 400"):
|
||||
raise Exception('Your request was rejected as a result of OpenAI´s safety system. Your prompt may '
|
||||
'contain text that is not allowed by their safety system.')
|
||||
|
||||
# We build an example here that we can call by either calling this file directly from the main directory,
|
||||
# or by adding it to our playground. You can call the example and adjust it to your needs or redefine it in the
|
||||
|
||||
Reference in New Issue
Block a user