
65 P.3d 1214 (2003)
149 Wash.2d 143
STATE of Washington, Petitioner,
v.
Darin Frank WILLIAMS, Respondent.
No. 72894-1.
Supreme Court of Washington, En Banc.
Argued February 6, 2003.
Decided April 10, 2003.
Andrew K. Miller, Benton County Prosecutor, Terry Bloor, Deputy, Kennewick, for Petitioner.
Kevin Holt, Kennewick, for Respondent.
PER CURIAM.
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 RCW 9.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.

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 *1215 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 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 Wash.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 RCW 9.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. See, e.g., RAP 2.2(b)(6) (providing that the State or a local government may only appeal "[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 abuse of discretion as a matter of law as to the sentence's length. See State v. Ammons, 105 Wash.2d 175, 183, 713 P.2d 719 (1986), 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 Wash.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 Wash.2d 472, 479, 973 P.2d 452 *1216 (1999) (reclassification of out-of-state convictions for purposes of calculating offender score); State v. Channon, 105 Wash.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 Wash.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.

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.
NOTES
[1]  The pre-2001 versions of present RCW 9.94A.660 were codified at RCW 9.94A.120.
[2]  Confusingly, although the court declined to decide the case on the merits, it also said it "affirmed" Williams's DOSA sentence. If an appellate court declines to review a trial court decision, and thus fails to reach the merits of the decision, it cannot be said to have affirmed that decision.
