Reputation: 205
i try to send following commands within httpNancy server. now i want to check whether it can happen 500 http reject error . does anyone can guide me ?
public CommandModule(ICommandFetcher fetcher, ICommandBus commandBus)
{
Post["/"] = parameters =>
{
var commandRequest = this.Bind<MessageEnvelope>();
var command = fetcher.FetchFrom(commandRequest);
commandBus.Send((ICommand) command, commandRequest.MetaData);
return HttpStatusCode.OK;
};
}
Upvotes: 1
Views: 1050
Reputation: 4932
I think what you need is the error handling application-level hooks as documented on the wiki
Upvotes: 3
Reputation: 3939
Please look at this example.
https://github.com/NancyFx/Nancy/issues/452
Hope it help.
Upvotes: 1
Reputation: 626
In most of the case 500 server error will occure when your system memory gets high or system RAM is consumed in that much ammount that it can't be able to send the request. close some unnecessary running applications to reduce it.
Upvotes: 1