Skip to content

Expose stable RecordData errors in the public SDK #262

Description

@thsnkhn

Problem

RecordData returns internal Record errors through the public interface, but Apps have no stable public type, codes, or helpers to inspect them. Business logic cannot reliably distinguish not found, validation, permission, conflict, and temporary failures without matching error text or importing internal packages.

Required behavior

  • Define stable Record operation errors in pkg/dygo.
  • Expose documented codes and errors.As-compatible types or helper functions.
  • Preserve safe details such as Entity, field, constraint, and Record identity when applicable.
  • Convert internal database errors at the SDK boundary.
  • Do not expose SQL text, database driver details, or secrets.
  • Use the same public error contract for direct RecordData calls and transaction callbacks.

Acceptance criteria

  • App code can branch on not found, validation, permission denied, and conflict errors.
  • Error matching does not depend on message text.
  • Internal packages remain private.
  • Existing HTTP error mapping continues to use the same stable semantics.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions