HttpResponse format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arturkulik
    Member
    • Apr 2025
    • 56

    #1

    HttpResponse format

    Hi guys,
    on espo 9.1.8 i've met problem that httpresponsebody like is not recognised correctly:
    :

    response json is like:

    {
    "errorCode": "409 CONFLICT",
    "message": "Request contains invalid fields",
    "details": {
    "variableId": "Problem description"
    },
    "timestamp": "2025-12-01T09:08:11.241180951"
    }


    $_lastHttpResponseBody - gives null
    $__caughtErrorCode - gives some espo like data with link and error code

    $ans=workflow\lastHttpResponseBody();
    $code=workflow\lastHttpResponseCode();
    both gives null also

    i've no idea whats can be wrong, the only thing that came to my mind is "errorCode": "409 CONFLICT", should be code (ointeger) onyl: "errorCode": "409",
  • lazovic
    Super Moderator
    • Jan 2022
    • 1194

    #2
    Hi arturkulik,

    Please note that it may be easier to understand the problem if you show the HTTP request that results in this response.

    Comment

    • arturkulik
      Member
      • Apr 2025
      • 56

      #3
      Request is OK ( it does what it has to do) but we broke data on purpose to deal with errors, and the resposne is a problem :/

      Comment

      Working...