@Override public String getMessage() { return "Failed to deliver notification with error code " + deliveryError.code(); }
/** * Returns the appropriate {@code DeliveryError} enum * corresponding to the Apple provided status code * * @param code status code provided by Apple * @return the appropriate DeliveryError */ public static DeliveryError ofCode(int code) { for (DeliveryError e : DeliveryError.values()) { if (e.code == code) return e; } return UNKNOWN; } }