Fix throwing 404
This commit is contained in:
parent
4169842018
commit
8a8633b43b
|
@ -1,4 +1,5 @@
|
|||
import { IncludeRelationship, Operation, Row } from "@budibase/types"
|
||||
import { HTTPError } from "@budibase/backend-core"
|
||||
import { handleRequest } from "../../../api/controllers/row/external"
|
||||
import { breakRowIdField } from "../../../integrations/utils"
|
||||
import sdk from "../../../sdk"
|
||||
|
@ -73,6 +74,10 @@ export async function find(tableId: string, rowId: string): Promise<Row> {
|
|||
relationships: true,
|
||||
})
|
||||
|
||||
if (!row) {
|
||||
throw new HTTPError("Row not found", 404)
|
||||
}
|
||||
|
||||
const table = await sdk.tables.getTable(tableId)
|
||||
// Preserving links, as the outputProcessing does not support external rows yet and we don't need it in this use case
|
||||
return await outputProcessing(table, row, {
|
||||
|
|
Loading…
Reference in New Issue