Ufoptg commited on
Commit
0fcc049
·
verified ·
1 Parent(s): cfab32b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +12 -4
main.py CHANGED
@@ -260,9 +260,17 @@ def v1beta3_google_ai(
260
  }
261
  )
262
  except requests.exceptions.RequestException:
263
- return SuccessResponse(status="False", randydev={"message": internal_error})
 
 
 
 
264
  except Exception:
265
- return SuccessResponse(status="False", randydev={"message": contact_support})
 
 
 
 
266
 
267
  @app.post("/UFoP/dalle3xl")
268
  def dalle_3xl(
@@ -281,7 +289,7 @@ def dalle_3xl(
281
  except requests.exceptions.RequestException:
282
  raise HTTPException(
283
  status_code=500,
284
- detail=CustomErrorResponseModel(detail=[{"Error": f"{internal_error}"}])
285
  )
286
 
287
  try:
@@ -289,7 +297,7 @@ def dalle_3xl(
289
  except Exception:
290
  raise HTTPException(
291
  status_code=500,
292
- detail=CustomErrorResponseModel(detail=[{"Error": f"{contact_support}"}])
293
  )
294
 
295
  if encoded_string:
 
260
  }
261
  )
262
  except requests.exceptions.RequestException:
263
+ raise HTTPException(
264
+ status_code=500,
265
+ detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": f"{internal_error}"}])
266
+ )
267
+ # return SuccessResponse(status="False", randydev={"message": internal_error})
268
  except Exception:
269
+ raise HTTPException(
270
+ status_code=500,
271
+ detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": f"{contact_support}"}])
272
+ )
273
+ # return SuccessResponse(status="False", randydev={"message": contact_support})
274
 
275
  @app.post("/UFoP/dalle3xl")
276
  def dalle_3xl(
 
289
  except requests.exceptions.RequestException:
290
  raise HTTPException(
291
  status_code=500,
292
+ detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": f"{internal_error}"}])
293
  )
294
 
295
  try:
 
297
  except Exception:
298
  raise HTTPException(
299
  status_code=500,
300
+ detail=CustomErrorResponseModel(detail=[{"status": "False", "randydev": f"{contact_support}"}])
301
  )
302
 
303
  if encoded_string: