Package 

Class OneSignalError.Detail


  • 
    public final class OneSignalError.Detail
    
                        

    A single reason a call failed.

    Nested rather than top-level so the name cannot collide with kotlin.Error, which is auto-imported everywhere, or shadow java.lang.Error in a Java file that imports it.

    • Method Detail

      • getCode

         final ErrorCode getCode()

        A stable code, safe to branch on. Never localized.

      • getBackendCode

         final String getBackendCode()

        Backend catalog code (e.g. user-1). Present only for BACKEND_ERROR.

      • getHttpStatus

         final Integer getHttpStatus()

        HTTP status of the backend response, when there was one.

      • getMessage

         final String getMessage()

        A human-readable description intended for logs and diagnostics, not for end users.

      • getSource

         final ErrorSource getSource()

        Who the failure came from. Kept on UNKNOWN so a backend failure is not re-attributed as client.

      • toMap

         final Map<String, Object> toMap()

        Projects this reason onto the cross-SDK wire shape consumed by the wrapper bridges.