Confirm this is a Go library issue and not an underlying Cloudflare API issue
Describe the bug
There is an errors node available via api that is not exposed to the sdk. The use case for us here is to scan domains and import certain metadata from these domains.
the problem here is we currently check if task.success, snooze and retry job later. this can lead to an infinite check for this domain when not needed. there is also a status field that can be checked status == finished.
but it is also important for us to be able to surface the errors to the user, it is also not available in the JSON field raw JSON field. and also for us to log the errors to provide insights to why certain things fail
Workaround is to make a direct api call without the sdk
To Reproduce
- create a url scan with a non existent domain e.g ( fhfjfkff.com e.g )
- fetch the results via api ( I see the
errors node )
- fetch the result via the sdk errors node not available via sdk
|
type ScanGetResponseTask struct { |
Code snippets
OS
macOS
Go version
1.26
Library version
v7.3.0
Confirm this is a Go library issue and not an underlying Cloudflare API issue
Describe the bug
There is an
errorsnode available via api that is not exposed to the sdk. The use case for us here is to scan domains and import certain metadata from these domains.the problem here is we currently check
if task.success, snooze and retry job later. this can lead to an infinite check for this domain when not needed. there is also astatusfield that can be checkedstatus == finished.but it is also important for us to be able to surface the
errorsto the user, it is also not available in the JSON field rawJSONfield. and also for us to log the errors to provide insights to why certain things failWorkaround is to make a direct api call without the sdk
To Reproduce
errorsnode )cloudflare-go/url_scanner/scan.go
Line 5261 in a5aab06
Code snippets
OS
macOS
Go version
1.26
Library version
v7.3.0