Package ai.shipeasy.admin.model
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum`see()` error kind.static enumTriage state. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncausedByFingerprint(String causedByFingerprint) booleanfingerprint(String fingerprint) firstSeenAt(String firstSeenAt) static ErrorRecordCreate an instance of ErrorRecord given an JSON stringFingerprint 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.getCount()Number of folded occurrences for this fingerprint.ISO-8601 timestamp the row was created.getEnv()Published env the reporting SDK ran against (e.g.Error class/name, e.g.Stable dedupe key (hash of `errorType` + normalized `message` + consequence).ISO-8601 timestamp of the first folded occurrence.getId()Stable opaque error id.getKind()`see()` error kind.Latest occurrence's sanitized extras, JSON-encoded.ISO-8601 timestamp of the most recent folded occurrence.Error message text.Consequence outcome — see `subject`.Project this issue belongs to.`@shipeasy/sdk` version of the latest occurrence, or `null`.Distinct, id-normalized route templates this issue has surfaced on, as a JSON-encoded string array (e.g.getSide()Which SDK side reported it — `client` or `server`.Where it surfaced — Worker name (`shipeasy`, `shipeasy-worker`) or `sdk-client` / `sdk-server`.getStack()Stack trace of the latest occurrence, or `null` if none was captured.Triage state.Consequence subject — `<errorType> causes the <subject> to <outcome>`.ISO-8601 timestamp of the last mutation (e.g.getUrl()Latest occurrence's raw URL (with ids intact), or `null`.inthashCode()kind(ErrorRecord.KindEnum kind) lastExtrasJson(String lastExtrasJson) lastSeenAt(String lastSeenAt) sdkVersion(String sdkVersion) voidsetCausedByFingerprint(String causedByFingerprint) voidvoidsetCreatedAt(String createdAt) voidvoidsetErrorType(String errorType) voidsetFingerprint(String fingerprint) voidsetFirstSeenAt(String firstSeenAt) voidvoidsetKind(ErrorRecord.KindEnum kind) voidsetLastExtrasJson(String lastExtrasJson) voidsetLastSeenAt(String lastSeenAt) voidsetMessage(String message) voidsetOutcome(String outcome) voidsetProjectId(String projectId) voidsetSdkVersion(String sdkVersion) voidsetSeenUrls(String seenUrls) voidvoidvoidvoidsetStatus(ErrorRecord.StatusEnum status) voidsetSubject(String subject) voidsetUpdatedAt(String updatedAt) voidstatus(ErrorRecord.StatusEnum status) toJson()Convert an instance of ErrorRecord to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_PROJECT_ID
- See Also:
-
SERIALIZED_NAME_FINGERPRINT
- See Also:
-
SERIALIZED_NAME_CAUSED_BY_FINGERPRINT
- See Also:
-
SERIALIZED_NAME_MESSAGE
- See Also:
-
SERIALIZED_NAME_ERROR_TYPE
- See Also:
-
SERIALIZED_NAME_STACK
- See Also:
-
SERIALIZED_NAME_SOURCE
- See Also:
-
SERIALIZED_NAME_URL
- See Also:
-
SERIALIZED_NAME_SEEN_URLS
- See Also:
-
SERIALIZED_NAME_SUBJECT
- See Also:
-
SERIALIZED_NAME_OUTCOME
- See Also:
-
SERIALIZED_NAME_SIDE
- See Also:
-
SERIALIZED_NAME_ENV
- See Also:
-
SERIALIZED_NAME_KIND
- See Also:
-
SERIALIZED_NAME_LAST_EXTRAS_JSON
- See Also:
-
SERIALIZED_NAME_SDK_VERSION
- See Also:
-
SERIALIZED_NAME_COUNT
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_FIRST_SEEN_AT
- See Also:
-
SERIALIZED_NAME_LAST_SEEN_AT
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ErrorRecord
public ErrorRecord()
-
-
Method Details
-
id
-
getId
Stable opaque error id.- Returns:
- id
-
setId
-
projectId
-
getProjectId
Project this issue belongs to.- Returns:
- projectId
-
setProjectId
-
fingerprint
-
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
-
causedByFingerprint
-
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
-
message
-
getMessage
Error message text.- Returns:
- message
-
setMessage
-
errorType
-
getErrorType
Error class/name, e.g. `TypeError`. `null` when the source didn't supply one.- Returns:
- errorType
-
setErrorType
-
stack
-
getStack
Stack trace of the latest occurrence, or `null` if none was captured.- Returns:
- stack
-
setStack
-
source
-
getSource
Where it surfaced — Worker name (`shipeasy`, `shipeasy-worker`) or `sdk-client` / `sdk-server`. `null` if unknown.- Returns:
- source
-
setSource
-
url
-
getUrl
Latest occurrence's raw URL (with ids intact), or `null`.- Returns:
- url
-
setUrl
-
seenUrls
-
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
-
subject
-
getSubject
Consequence subject — `<errorType> causes the <subject> to <outcome>`. `null` if no consequence was reported.- Returns:
- subject
-
setSubject
-
outcome
-
getOutcome
Consequence outcome — see `subject`. `null` if no consequence was reported.- Returns:
- outcome
-
setOutcome
-
side
-
getSide
Which SDK side reported it — `client` or `server`. `null` if unknown.- Returns:
- side
-
setSide
-
env
-
getEnv
Published env the reporting SDK ran against (e.g. `dev`, `staging`, `prod`). `null` if unknown.- Returns:
- env
-
setEnv
-
kind
-
getKind
`see()` error kind. `null` when the source didn't classify the occurrence.- Returns:
- kind
-
setKind
-
lastExtrasJson
-
getLastExtrasJson
Latest occurrence's sanitized extras, JSON-encoded. `null` if none.- Returns:
- lastExtrasJson
-
setLastExtrasJson
-
sdkVersion
-
getSdkVersion
`@shipeasy/sdk` version of the latest occurrence, or `null`.- Returns:
- sdkVersion
-
setSdkVersion
-
count
-
getCount
Number of folded occurrences for this fingerprint. minimum: 1- Returns:
- count
-
setCount
-
status
-
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
-
firstSeenAt
-
getFirstSeenAt
ISO-8601 timestamp of the first folded occurrence.- Returns:
- firstSeenAt
-
setFirstSeenAt
-
lastSeenAt
-
getLastSeenAt
ISO-8601 timestamp of the most recent folded occurrence. Rows are ordered by this, descending.- Returns:
- lastSeenAt
-
setLastSeenAt
-
createdAt
-
getCreatedAt
ISO-8601 timestamp the row was created.- Returns:
- createdAt
-
setCreatedAt
-
updatedAt
-
getUpdatedAt
ISO-8601 timestamp of the last mutation (e.g. a status flip).- Returns:
- updatedAt
-
setUpdatedAt
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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
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
Convert an instance of ErrorRecord to an JSON string- Returns:
- JSON string
-