Initialize responce independent of errors #460

Closed
opened 2020-12-07 00:30:27 +00:00 by 6543 · 2 comments
Owner

since errors can ocure before a http request, responce can be nil.

I see a lot of people using responce.StatusCode without checking, this can cause nil pointer exeptions!!

So I ropose to return a initialized empty responce no mather if a request actualy has happend

since errors can ocure before a http request, responce can be nil. I see a lot of people using responce.StatusCode without checking, this can cause nil pointer exeptions!! So I ropose to return a initialized empty responce no mather if a request actualy has happend
6543 added the
kind/enhancement
label 2020-12-07 00:30:27 +00:00
6543 added this to the v0.14.0 milestone 2020-12-07 00:30:34 +00:00
6543 modified the milestone from v0.14.0 to v0.15.0 2021-02-16 11:35:10 +00:00
Author
Owner

need more considderation it it's worth the extra code ...

need more considderation it it's worth the extra code ...
6543 added the
status/needs-feedback
label 2021-02-16 11:35:43 +00:00
6543 added the
reviewed/wontfix
label 2021-06-30 20:45:37 +00:00
Author
Owner

got no response - closing

got no response - closing
6543 closed this issue 2021-06-30 20:45:40 +00:00
6543 removed this from the v0.15.0 milestone 2021-06-30 20:45:46 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/go-sdk#460
No description provided.