The issue here is whether the State may appeal the trial court's determination of a defendant's eligibility for special sentencing under the drug offender sentencing alternative (DOSA) provisions of RCW9.94A.660. We conclude that such determinations are indeed appealable and therefore reverse the Court of Appeals and direct it to consider the merits of the State's substantive challenges to the defendant's DOSA sentence. *Page 145 FACTS In May 2000, Darin Williams pleaded guilty to manufacturing, possessing, and delivering methamphetamine. During a presentence hearing, Williams asked the superior court to give him a special DOSA sentence. Under DOSA, a judge may sentence drug defendants to a period of punishment equal to the midpoint of the standard sentencing range, with half the period spent in incarceration and the other half spent in a substance abuse treatment program and community custody. RCW 9.94A.660(2). The State opposed the request and argued that Williams did not meet the statutory eligibility requirements for DOSA. The trial court, however, granted the request, imposing a 75-month prison term and a 75-month period of community custody under DOSA.
The State appealed, again arguing that Williams was ineligible for DOSA. The State first asserted that the trial court had erred by giving retroactive effect to the DOSA eligibility provisions of former RCW 9.94A.120(6)(a)(ii) (1999) dealing with prior criminal history.1 Noting that RCW 9.94A.345 requires courts to impose criminal sentences according to the law in effect at the time the offense was committed, the State argued that Williams should have instead been subjected to the more restrictive DOSA eligibility requirements set forth in former RCW 9.94A.120(6) (1998), prior to its amendment on July 25, 1999. Alternatively, the State argued that Williams was ineligible for DOSA because the one and one-half pounds of ephedrine he had possessed was not a "small quantity" for purposes of the statute.
After reviewing the record, the Court of Appeals declined to reach either of these issues on the merits.2 The appellate court noted that, under RAP 2.2(b)(6), the State *Page 146 generally can appeal only "`[a] sentence in a criminal case which is outside the standard range for the offense or which the state or local government believes involves a miscalculation of the standard range.'"State v. Williams, 112 Wn. App. 171, 176, 48 P.3d 354 (2002). Since the total length of confinement and community placement under DOSA must, by statute, equal the midpoint of the standard sentencing range, the Court of Appeals held that no appeal could be taken as a matter of right by the State. It further held that discretionary review of the matter under RAP 2.3(b) was not called for, since the superior court had not committed any obvious errors that would render further proceedings useless. We now grant the State's petition for review and reverse the Court of Appeals.
ISSUE May the State appeal a trial court's determination of a defendant's eligibility for alternative sentencing under the DOSA provisions of RCW9.94A.660?
ANALYSIS As a general rule, the length of a criminal sentence imposed by a superior court is not subject to appellate review, so long as the punishment falls within the correct standard sentencing range established by the Sentencing Reform Act of 1981, chapter 9.94A RCW. See, e.g., RAP 2.2(b)(6) (providing that the State or a local government may appeal only "[a] sentence in a criminal case which is outside the standard range for the offense or which the state or local government believes involves a miscalculation of the standard range"); RCW 9.94A.585(1) ("A sentence within the standard sentence range for the offense shall not be appealed."). This precept arises from the notion that, so long as the sentence falls within the proper presumptive sentencing ranges set by the legislature, there can be no *Page 147 abuse of discretion as a matter of law as to the sentence's length. SeeState v. Ammons, 105 Wn.2d 175, 183, 713 P.2d 719, 718 P.2d 796 (1986). However, this prohibition does not bar a party's right to challenge the underlying legal conclusions and determinations by which a court comes to apply a particular sentencing provision. See State v. Mail, 121 Wn.2d 707,712, 854 P.2d 1042 (1993) (permitting appellate review of a criminal sentence where a defendant can demonstrate that the "sentencing court had a duty to follow some specific procedure required by the [Sentencing Reform Act], and that the court failed to do so"). Thus, it is well established that appellate review is still available for the correction of legal errors or abuses of discretion in the determination of what sentence applies. See, e.g., State v. Ford, 137 Wn.2d 472, 479,973 P.2d 452 (1999) (misclassification of out-of-state convictions for purposes of calculating offender score); State v. Channon,105 Wn. App. 869, 876, 20 P.3d 476 (2001) (determination of whether two or more crimes should be considered the "same criminal conduct" for purposes of sentencing); see also State v. Herzog, 112 Wn.2d 419, 423,771 P.2d 739 (1989) (noting that an absolute prohibition on the right to appeal would violate article I, section 22 of the Washington Constitution).
In the present case, the State sought appellate review of Williams's sentence on the grounds that the trial court had improperly given retroactive effect to the DOSA eligibility provisions of former RCW 9.94A.120(6)(a)(ii) (1999) dealing with prior criminal history and had ignored the "small" drug quantity requirement of former RCW 9.94A.120(6)(a)(iii) (1999). These are not challenges to a standard range sentence as such, but challenges to claimed legal errors in determining which sentencing provision applies. The State therefore had the right to appeal, and the Court of Appeals erred when it declined to reach the merits of the State's case. *Page 148 CONCLUSION The Court of Appeals decision is reversed. The case is remanded to that court with directions to reinstate the case as an appeal to be considered on the merits.