Skip to content

Conversation

steve-chavez
Copy link
Member

@steve-chavez steve-chavez commented Aug 19, 2025

Closes #180.

Before:

select net.http_get('http://localhost:8080/pathological?status=200&delay=6', timeout_milliseconds := 1000);
 http_get
----------
        1
(1 row)

postgres=# select timed_out, error_msg from net._http_response ;
 timed_out |                                                                            error_msg
-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
           | Timeout of 1000 ms reached. Total time: 1001.461000 ms (DNS time: 0.052000 ms, TCP/SSL handshake time: 0.258000 ms, HTTP Request/Response time: 1001.095000 ms)
(1 row)

Now:

 timed_out |                                                                            error_msg
-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 t         | Timeout of 1000 ms reached. Total time: 1001.106000 ms (DNS time: 0.038000 ms, TCP/SSL handshake time: 0.176000 ms, HTTP Request/Response time: 1000.856000 ms)
(1 row)

@steve-chavez steve-chavez changed the title Fix timedout fix: timed_out in net._http_response is always NULL Aug 19, 2025
@steve-chavez steve-chavez force-pushed the fix-timedout branch 4 times, most recently from bc3d24d to 5327999 Compare August 19, 2025 22:29
@steve-chavez steve-chavez marked this pull request as ready for review August 19, 2025 22:30
@steve-chavez steve-chavez requested review from laurenceisla and za-arthur and removed request for laurenceisla August 19, 2025 22:40
Copy link

@za-arthur za-arthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. I added just couple of suggestions below.

Closes supabase#180.

Before:

```sql
select net.http_get('http://localhost:8080/pathological?status=200&delay=6', timeout_milliseconds := 1000);
 http_get
----------
        1
(1 row)

postgres=# select timed_out, error_msg from net._http_response ;
 timed_out |                                                                            error_msg
-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
           | Timeout of 1000 ms reached. Total time: 1001.461000 ms (DNS time: 0.052000 ms, TCP/SSL handshake time: 0.258000 ms, HTTP Request/Response time: 1001.095000 ms)
(1 row)
```

Now:
```sql
 timed_out |                                                                            error_msg
-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 t         | Timeout of 1000 ms reached. Total time: 1001.106000 ms (DNS time: 0.038000 ms, TCP/SSL handshake time: 0.176000 ms, HTTP Request/Response time: 1000.856000 ms)
(1 row)
```

add polyfill
@steve-chavez
Copy link
Member Author

@za-arthur Addressed all the feedback. Thanks!

Copy link

@za-arthur za-arthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes! LGTM.

@steve-chavez steve-chavez merged commit 1d714e1 into supabase:master Aug 21, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timed_out in net._http_response is always NULL
2 participants