Skip to content

Errors not returned in url scanning response #4313

@adelowo

Description

@adelowo

Confirm this is a Go library issue and not an underlying Cloudflare API issue

  • This is an issue with the Go library

Describe the bug

Image

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

  1. create a url scan with a non existent domain e.g ( fhfjfkff.com e.g )
  2. fetch the results via api ( I see the errors node )
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions