feat(client): detect pagination limit at client instantiation
Closes #15
This commit is contained in:
parent
f4d69460af
commit
7e1e9eb26b
4 changed files with 25 additions and 15 deletions
|
@ -75,7 +75,11 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
|
|||
} else {
|
||||
apiToken = data.ApiToken.ValueString()
|
||||
}
|
||||
client := client.NewClient(baseURI, apiToken)
|
||||
client, err := client.NewClient(baseURI, apiToken)
|
||||
if err != nil {
|
||||
resp.Diagnostics.AddError("failed to instantiate forgejo client", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp.DataSourceData = client
|
||||
resp.ResourceData = client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue