__PACKAGE__->wing_fields(
some_field => {
dbic => ..
...
options => sub { return [] },
},
);
Passing a sub ref to options, which then ultimately returns an empty array causes a 504 error. It's bad for it to return an empty array anyway. It should never be done. But even so, it should not be a 504 error.