You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ListByDatabaseComplete method returns only a slice of the result object - which makes sense in the happy path, however when the API does something unexpectedly (like returning a 404 when the list contains no items) - the ListByDatabaseCompleteResult object doesn't contain the HTTP Response, meaning it's not possible to validate this).
As such we'll want to extend the List[XXX]Complete method such that both it and it's List[XXX]Result:
Return the Result as a pointer (to handle the unhappy path)
Add the last HTTP Response (so that we can handle 404's etc)
References
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Community Note
Service Used
API Versions Used
Description
Example:
go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks/method_listbydatabase.go
Lines 21 to 23 in 4b17f17
The
ListByDatabaseComplete
method returns only a slice of the result object - which makes sense in the happy path, however when the API does something unexpectedly (like returning a 404 when the list contains no items) - theListByDatabaseCompleteResult
object doesn't contain the HTTP Response, meaning it's not possible to validate this).As such we'll want to extend the
List[XXX]Complete
method such that both it and it'sList[XXX]Result
:References
No response
The text was updated successfully, but these errors were encountered: