Elysia undefined is not an object (evaluating 'error2.schema')

a year ago

I have a simple Elysia server with query params type constraints.

When running on localhost, if I leave out a required param, I get the expected error in json format

When on railway (https://hunt.up.railway.app) I get

undefined is not an object (evaluating 'error2.schema')

8 Replies

a year ago

98eb5118-41c1-49d1-bd13-071f6a9e3ee2


a year ago

You can check out the swagger at https://hunt.up.railway.app/swagger


a year ago

I don't think this is related to railway... did you try a dockerized environment locally?


a year ago

I did not


a year ago

On railway, it works when every required param is specified though


a year ago

This only happens when Elysia returns an error json


a year ago

How would I go about doing that the closest possible to the way railway does it?


a year ago

Just found the solution!

Elysia weirdly fails validation when NODE_ENV=production, setting it to development did the trick for now


Welcome!

Sign in to your Railway account to join the conversation.

Loading...