add stack trace
This commit is contained in:
parent
c301d1ceba
commit
954f26b2b3
|
@ -86,3 +86,106 @@ export class CreateAdUseCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
repo error
|
||||||
|
PrismaClientValidationError:
|
||||||
|
Invalid `this._prisma[this._model].create()` invocation in
|
||||||
|
/usr/src/app/src/modules/ad/adapters/secondaries/ads.repository.ts:15:51
|
||||||
|
|
||||||
|
12 console.log(entity);
|
||||||
|
13 console.log('*****************************************');
|
||||||
|
14 try {
|
||||||
|
→ 15 const res = await this._prisma[this._model].create({
|
||||||
|
data: {
|
||||||
|
uuid: undefined,
|
||||||
|
userUuid: '113e0000-0000-4000-a000-000000000000',
|
||||||
|
driver: true,
|
||||||
|
passenger: false,
|
||||||
|
frequency: 'RECURRENT',
|
||||||
|
fromDate: new Date('2023-01-15T00:00:00.000Z'),
|
||||||
|
toDate: new Date('2023-08-01T00:00:00.000Z'),
|
||||||
|
seatsDriver: 3,
|
||||||
|
seatsPassenger: 0,
|
||||||
|
strict: false,
|
||||||
|
monMargin: 800,
|
||||||
|
tueMargin: 900,
|
||||||
|
wedMargin: 900,
|
||||||
|
thuMargin: 900,
|
||||||
|
friMargin: 900,
|
||||||
|
satMargin: 900,
|
||||||
|
sunMargin: 900,
|
||||||
|
monTime: '04:40',
|
||||||
|
tueTime: undefined,
|
||||||
|
wedTime: undefined,
|
||||||
|
thuTime: undefined,
|
||||||
|
friTime: undefined,
|
||||||
|
satTime: undefined,
|
||||||
|
sunTime: undefined,
|
||||||
|
addresses: [
|
||||||
|
{
|
||||||
|
lon: 48.68944549560547,
|
||||||
|
lat: 6.176510334014893,
|
||||||
|
houseNumber: '5',
|
||||||
|
street: 'Avenue Foch',
|
||||||
|
locality: 'Nancy',
|
||||||
|
postalCode: '54000',
|
||||||
|
country: 'France',
|
||||||
|
position: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lon: 48.85660171508789,
|
||||||
|
lat: 2.3522000312805176,
|
||||||
|
locality: 'Paris',
|
||||||
|
postalCode: '75000',
|
||||||
|
country: 'France',
|
||||||
|
position: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
},
|
||||||
|
include: undefined
|
||||||
|
})
|
||||||
|
|
||||||
|
Argument addresses: Got invalid value
|
||||||
|
[
|
||||||
|
{
|
||||||
|
lon: 48.68944549560547,
|
||||||
|
lat: 6.176510334014893,
|
||||||
|
houseNumber: '5',
|
||||||
|
street: 'Avenue Foch',
|
||||||
|
locality: 'Nancy',
|
||||||
|
postalCode: '54000',
|
||||||
|
country: 'France',
|
||||||
|
position: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
lon: 48.85660171508789,
|
||||||
|
lat: 2.3522000312805176,
|
||||||
|
locality: 'Paris',
|
||||||
|
postalCode: '75000',
|
||||||
|
country: 'France',
|
||||||
|
position: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
on prisma.createOneAd. Provided List<Json>, expected AddressCreateNestedManyWithoutAdInput:
|
||||||
|
type AddressCreateNestedManyWithoutAdInput {
|
||||||
|
create?: AddressCreateWithoutAdInput | List<AddressCreateWithoutAdInput> | AddressUncheckedCreateWithoutAdInput | List<AddressUncheckedCreateWithoutAdInput>
|
||||||
|
connectOrCreate?: AddressCreateOrConnectWithoutAdInput | List<AddressCreateOrConnectWithoutAdInput>
|
||||||
|
createMany?: AddressCreateManyAdInputEnvelope
|
||||||
|
connect?: AddressWhereUniqueInput | List<AddressWhereUniqueInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
at mi.validate (/usr/src/app/node_modules/@prisma/client/runtime/library.js:149:91)
|
||||||
|
at tn.createMessage (/usr/src/app/node_modules/@prisma/client/runtime/library.js:166:1205)
|
||||||
|
at /usr/src/app/node_modules/@prisma/client/runtime/library.js:179:10962
|
||||||
|
at runInChildSpan (/usr/src/app/node_modules/@prisma/client/runtime/library.js:70:25817)
|
||||||
|
at PrismaService._executeRequest (/usr/src/app/node_modules/@prisma/client/runtime/library.js:179:10951)
|
||||||
|
at PrismaService._request (/usr/src/app/node_modules/@prisma/client/runtime/library.js:179:10484)
|
||||||
|
at AdsRepository.create (/usr/src/app/src/modules/ad/adapters/secondaries/ads.repository.ts:15:19)
|
||||||
|
at CreateAdUseCase.execute (/usr/src/app/src/modules/ad/domain/usecases/create-ad.usecase.ts:69:17)
|
||||||
|
at AdController.createAd (/usr/src/app/src/modules/ad/adapters/primaries/ad.controller.ts:49:18)
|
||||||
|
at /usr/src/app/node_modules/@nestjs/microservices/context/rpc-proxy.js:11:32
|
||||||
|
at Object.Create (/usr/src/app/node_modules/@nestjs/microservices/server/server-grpc.js:148:40) {
|
||||||
|
clientVersion: '4.13.0'
|
||||||
|
*/
|
||||||
|
|
Loading…
Reference in New Issue