Class ErrorRecord

java.lang.Object
ai.shipeasy.admin.model.ErrorRecord

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ErrorRecord extends Object
A tracked production error — one row per distinct issue, keyed by `fingerprint`. Rows are never created by hand: an ingestion path (worker log drain / the `see()` SDK reporter) folds each occurrence into the matching row, bumping `count` and `lastSeenAt`. The admin surface only lists them, reads one, and flips `status`. Field names are camelCase (the D1 row projected through Drizzle). Many columns are nullable because the reporting source may not supply them.
  • Field Details

  • Constructor Details

    • ErrorRecord

      public ErrorRecord()
  • Method Details

    • id

      public ErrorRecord id(@Nonnull String id)
    • getId

      @Nonnull public String getId()
      Stable opaque error id.
      Returns:
      id
    • setId

      public void setId(@Nonnull String id)
    • projectId

      public ErrorRecord projectId(@Nonnull String projectId)
    • getProjectId

      @Nonnull public String getProjectId()
      Project this issue belongs to.
      Returns:
      projectId
    • setProjectId

      public void setProjectId(@Nonnull String projectId)
    • fingerprint

      public ErrorRecord fingerprint(@Nonnull String fingerprint)
    • getFingerprint

      @Nonnull public String getFingerprint()
      Stable dedupe key (hash of `errorType` + normalized `message` + consequence). Unique per project — every occurrence with the same fingerprint folds into this one row.
      Returns:
      fingerprint
    • setFingerprint

      public void setFingerprint(@Nonnull String fingerprint)
    • causedByFingerprint

      public ErrorRecord causedByFingerprint(@Nullable String causedByFingerprint)
    • getCausedByFingerprint

      @Nullable public String getCausedByFingerprint()
      Fingerprint of the issue this one descends from — set when `see()` reported the same error (re-throw) or its `{ cause }` (wrap) at an inner boundary first. Points at another error's `fingerprint` in the same project (soft reference, no FK). `null` for a root issue.
      Returns:
      causedByFingerprint
    • setCausedByFingerprint

      public void setCausedByFingerprint(@Nullable String causedByFingerprint)
    • message

      public ErrorRecord message(@Nonnull String message)
    • getMessage

      @Nonnull public String getMessage()
      Error message text.
      Returns:
      message
    • setMessage

      public void setMessage(@Nonnull String message)
    • errorType

      public ErrorRecord errorType(@Nullable String errorType)
    • getErrorType

      @Nullable public String getErrorType()
      Error class/name, e.g. `TypeError`. `null` when the source didn't supply one.
      Returns:
      errorType
    • setErrorType

      public void setErrorType(@Nullable String errorType)
    • stack

      public ErrorRecord stack(@Nullable String stack)
    • getStack

      @Nullable public String getStack()
      Stack trace of the latest occurrence, or `null` if none was captured.
      Returns:
      stack
    • setStack

      public void setStack(@Nullable String stack)
    • source

      public ErrorRecord source(@Nullable String source)
    • getSource

      @Nullable public String getSource()
      Where it surfaced — Worker name (`shipeasy`, `shipeasy-worker`) or `sdk-client` / `sdk-server`. `null` if unknown.
      Returns:
      source
    • setSource

      public void setSource(@Nullable String source)
    • url

      public ErrorRecord url(@Nullable String url)
    • getUrl

      @Nullable public String getUrl()
      Latest occurrence's raw URL (with ids intact), or `null`.
      Returns:
      url
    • setUrl

      public void setUrl(@Nullable String url)
    • seenUrls

      public ErrorRecord seenUrls(@Nullable String seenUrls)
    • getSeenUrls

      @Nullable public String getSeenUrls()
      Distinct, id-normalized route templates this issue has surfaced on, as a JSON-encoded string array (e.g. `[\"https://app/dashboard/#/gates\"]`). UUIDs / numeric ids / opaque tokens are collapsed to `#` so the same route under different ids counts once. `null` if none recorded.
      Returns:
      seenUrls
    • setSeenUrls

      public void setSeenUrls(@Nullable String seenUrls)
    • subject

      public ErrorRecord subject(@Nullable String subject)
    • getSubject

      @Nullable public String getSubject()
      Consequence subject — `<errorType> causes the <subject> to <outcome>`. `null` if no consequence was reported.
      Returns:
      subject
    • setSubject

      public void setSubject(@Nullable String subject)
    • outcome

      public ErrorRecord outcome(@Nullable String outcome)
    • getOutcome

      @Nullable public String getOutcome()
      Consequence outcome — see `subject`. `null` if no consequence was reported.
      Returns:
      outcome
    • setOutcome

      public void setOutcome(@Nullable String outcome)
    • side

      public ErrorRecord side(@Nullable String side)
    • getSide

      @Nullable public String getSide()
      Which SDK side reported it — `client` or `server`. `null` if unknown.
      Returns:
      side
    • setSide

      public void setSide(@Nullable String side)
    • env

      public ErrorRecord env(@Nullable String env)
    • getEnv

      @Nullable public String getEnv()
      Published env the reporting SDK ran against (e.g. `dev`, `staging`, `prod`). `null` if unknown.
      Returns:
      env
    • setEnv

      public void setEnv(@Nullable String env)
    • kind

      public ErrorRecord kind(@Nullable ErrorRecord.KindEnum kind)
    • getKind

      @Nullable public ErrorRecord.KindEnum getKind()
      `see()` error kind. `null` when the source didn't classify the occurrence.
      Returns:
      kind
    • setKind

      public void setKind(@Nullable ErrorRecord.KindEnum kind)
    • lastExtrasJson

      public ErrorRecord lastExtrasJson(@Nullable String lastExtrasJson)
    • getLastExtrasJson

      @Nullable public String getLastExtrasJson()
      Latest occurrence's sanitized extras, JSON-encoded. `null` if none.
      Returns:
      lastExtrasJson
    • setLastExtrasJson

      public void setLastExtrasJson(@Nullable String lastExtrasJson)
    • sdkVersion

      public ErrorRecord sdkVersion(@Nullable String sdkVersion)
    • getSdkVersion

      @Nullable public String getSdkVersion()
      `@shipeasy/sdk` version of the latest occurrence, or `null`.
      Returns:
      sdkVersion
    • setSdkVersion

      public void setSdkVersion(@Nullable String sdkVersion)
    • count

      public ErrorRecord count(@Nonnull Integer count)
    • getCount

      @Nonnull public Integer getCount()
      Number of folded occurrences for this fingerprint. minimum: 1
      Returns:
      count
    • setCount

      public void setCount(@Nonnull Integer count)
    • status

      public ErrorRecord status(@Nonnull ErrorRecord.StatusEnum status)
    • getStatus

      @Nonnull public ErrorRecord.StatusEnum getStatus()
      Triage state. `open` is the default; a `resolved` error reopens automatically (ingestion-side) if it recurs; `ignored` is sticky until flipped back here.
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull ErrorRecord.StatusEnum status)
    • firstSeenAt

      public ErrorRecord firstSeenAt(@Nonnull String firstSeenAt)
    • getFirstSeenAt

      @Nonnull public String getFirstSeenAt()
      ISO-8601 timestamp of the first folded occurrence.
      Returns:
      firstSeenAt
    • setFirstSeenAt

      public void setFirstSeenAt(@Nonnull String firstSeenAt)
    • lastSeenAt

      public ErrorRecord lastSeenAt(@Nonnull String lastSeenAt)
    • getLastSeenAt

      @Nonnull public String getLastSeenAt()
      ISO-8601 timestamp of the most recent folded occurrence. Rows are ordered by this, descending.
      Returns:
      lastSeenAt
    • setLastSeenAt

      public void setLastSeenAt(@Nonnull String lastSeenAt)
    • createdAt

      public ErrorRecord createdAt(@Nonnull String createdAt)
    • getCreatedAt

      @Nonnull public String getCreatedAt()
      ISO-8601 timestamp the row was created.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull String createdAt)
    • updatedAt

      public ErrorRecord updatedAt(@Nonnull String updatedAt)
    • getUpdatedAt

      @Nonnull public String getUpdatedAt()
      ISO-8601 timestamp of the last mutation (e.g. a status flip).
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nonnull String updatedAt)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to ErrorRecord
    • fromJson

      public static ErrorRecord fromJson(String jsonString) throws IOException
      Create an instance of ErrorRecord given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of ErrorRecord
      Throws:
      IOException - if the JSON string is invalid with respect to ErrorRecord
    • toJson

      public String toJson()
      Convert an instance of ErrorRecord to an JSON string
      Returns:
      JSON string