File tree 2 files changed +7
-2
lines changed
src/app/[username]/[repo]
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ def replace_path(match):
277
277
@router .post ("/stream" )
278
278
async def generate_stream (request : Request , body : ApiRequest ):
279
279
try :
280
+ print ("generate_stream called!" )
280
281
# Initial validation checks
281
282
if len (body .instructions ) > 1000 :
282
283
return {"error" : "Instructions exceed maximum length of 1000 characters" }
@@ -290,9 +291,12 @@ async def generate_stream(request: Request, body: ApiRequest):
290
291
]:
291
292
return {"error" : "Example repos cannot be regenerated" }
292
293
294
+ print ("initial validation checks passed" )
295
+
293
296
async def event_generator ():
294
297
try :
295
298
# Get cached github data
299
+ print ("backend should be processing if you see this" )
296
300
github_data = get_cached_github_data (
297
301
body .username , body .repo , body .github_pat
298
302
)
@@ -415,6 +419,7 @@ async def event_generator():
415
419
except Exception as e :
416
420
yield f"data: { json .dumps ({'error' : str (e )})} \n \n "
417
421
422
+ print ("returning streaming response" )
418
423
return StreamingResponse (event_generator (), media_type = "text/event-stream" )
419
424
except Exception as e :
420
425
return {"error" : str (e )}
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ export default function Repo() {
57
57
mapping = { state . mapping }
58
58
diagram = { state . diagram }
59
59
/>
60
- ) : error ? (
60
+ ) : error || state . error ? (
61
61
< div className = "mt-12 text-center" >
62
62
< p className = "max-w-4xl text-lg font-medium text-red-600" >
63
- { error }
63
+ { error || state . error }
64
64
</ p >
65
65
{ /* {error.includes("Rate limit") && (
66
66
<p className="mt-2 text-sm text-gray-600">
You can’t perform that action at this time.
0 commit comments