“Whoops. Looks like an internal server error. Sear...
# orm-help
w
“Whoops. Looks like an internal server error. Search your server logs for request ID: us1managementcjl5g30ymerx30b77gqupdrlm”,
👍 1
l
I've found that error can mean many things. On Heroku, it typically means the JVM ran out of memory. But it's also been related to my code, typically when I'm running a destructive operation that's against the PK-FK SQL relations. If you're running something destructive, check that your delete CASCADE/SET_NULLs are correct
w
Hrmmm - happens when I add this to my datamodel:
Copy code
type OrderItem {
  id: ID! @unique
  title: String!
  description: String!
  image: String!
  largeImage: String!
  price: Int!
  quantity: Int! @default(value: 1)
  user: User
}
see anything there?
happens when I strip it down to this too:
Copy code
type OrderItem {
  id: ID! @unique
}
l
That is odd. Do you already have data in
OrderItem
? Can you deploy anything? e.g.
Copy code
type User { 
   ...
   dummy: String
}
w
yeah if I remove that 1 type it works fine
let me try add something else
l
I know Nilan and the crew can pull the error if they're around
w
adding anything causes an error
@nilan hiii 🙂
l
I went to Heroku for Prisma dev to quickly see the error logs. I had a few of these errors that I had no troubleshooting prayer without seeing the error, so if you have the time, it may be best to wait to get the error to avoid hours of hair ripping. 🙂
w
hmm may be best
l
I'd bet that SQL is grumpy about stale data somewhere
w
it works!
💥 1
l
Did it just start working??
w
yep
c
@wesbos you should add
1
as
"1"
quantity: Int! @default(value: "1")
w
ya? How come
c
Wait a minute, I'll point you to the docs 🙂
Copy code
Notice that you need to always provide the value in double-quotes, even for non-string types such as Boolean or Int.
w
Ah good to know -thanks!
c
No problem. Btw, thanks for the awesome tutorials!
w
😄 you’re welcome
n
Hi @wesbos reaching out in a DM 🙂