1

By default - if DataSnap method (which is declared inside {$METHODINFO ON} and {$METHODINFO OFF}) experiences exception, then DataSnap returns HTTP response with status code 500 and simple message {"error":"SQL error... whatever..."}. That is fine for system errors, but I would like to handle validation errors separately - by returning extended error message and HTTP code 400. Is it possible to do?

TomR
  • 2,696
  • 6
  • 34
  • 87
  • 1
    http://stackoverflow.com/questions/16674634/is-it-possible-to-change-the-response-code-when-user-authorization-fails-in-a-da apparently gives answer – TomR Nov 08 '16 at 09:21

0 Answers0