medusajs/medusa · error · MedusaError
Claim with id: ${req.params.id} was not found
Error message
Claim with id: ${req.params.id} was not found What it means
The GET /admin/claims/:id route queries the order module for a claim by id (or filter) and throws NOT_FOUND (HTTP 404) when no claim matches.
Source
Thrown at packages/medusa/src/api/admin/claims/[id]/route.ts:21
MedusaResponse,
refetchEntity,
} from "@medusajs/framework/http"
import { MedusaError } from "@medusajs/framework/utils"
import { AdminClaimResponse, HttpTypes } from "@medusajs/framework/types"
export const GET = async (
req: AuthenticatedMedusaRequest<{}, HttpTypes.SelectParams>,
res: MedusaResponse<AdminClaimResponse>
) => {
const claim = await refetchEntity({
entity: "order_claim",
idOrFilter: req.params.id,
scope: req.scope,
fields: req.queryConfig.fields,
})
if (!claim) {
throw new MedusaError(
MedusaError.Types.NOT_FOUND,
`Claim with id: ${req.params.id} was not found`
)
}
res.status(200).json({ claim })
}
View on GitHub (pinned to 5e06e544a2)
Solutions
- Fetch the order's claims via GET /admin/orders/:id/claims and use those ids
- Verify the claim id exists in the same environment/backend
- Handle 404 gracefully in claim navigation
Defensive patterns
Strategy: try-catch
Validate before calling
const { claims } = await sdk.admin.order.listClaims({ id: claimId })
if (!claims.length) throw new Error("claim not found") Type guard
null
Try / catch
try { await getClaim(id) } catch (e) { if (e.statusCode === 404) navigate("/orders") else throw e } Prevention
- Derive claim ids from the order's claims relation
- Guard deep links with existence checks
When it happens
Trigger: GET /admin/claims/:id where the claim id is invalid or the claim belongs to data not visible to the current scope.
Common situations: Opening a claim detail page for a claim created in another environment; deleted order/claim data; typo in the id from URL manipulation.
Related errors
- Exchange with id: ${req.params.id} was not found
- Campaign with id: ${req.params.id} was not found
- Campaign with id "${req.params.id}" not found
- Currency with code: ${req.params.code} was not found
- Customer group with id: ${req.params.id} not found
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/d3710d8157b539f2.
Report an issue: GitHub.