Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem Statement

...

Problem statement

An internal error occurs with a response code 500 while trying to use CLI Action

...

- getSpaceList.

Error

...

message 

Code Block
themeMidnight
Error data: {"reason":"Internal Server Error","message":"","statusCode":500}
Retry request on 500 error.

Log

...

entries 

Here is the a sample log for this error: In the logs below, wikithe mentioned error in which, wiki.domain.com is the URL and here, note that it is for representation purpose only:

Code Block
themeMidnight
{"self":"https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage","next":"/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300","prev":"/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=250","base":"https://wiki.domain.com","context":""}}
URL requested: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Request type: GET
Content type: application/json; charset=utf-8
Request property Cookie, value: [JSESSIONID=D212***]
Request property X-Atlassian-Token, value: [no-check]
Request property Content-Type, value: [application/json; charset=utf-8]
Response code: 500, message: null, url: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Error data: {"reason":"Internal Server Error","message":"","statusCode":500}
Retry request on 500 error.
Request property Cookie, value: [JSESSIONID=D212***]
Request property X-Atlassian-Token, value: [no-check]
Request property Content-Type, value: [application/json; charset=utf-8]
Response code: 500, message: null, url: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Error data: {"reason":"Internal Server Error","message":"","statusCode":500}
Retry request on 500 error.
Request property Cookie, value: [JSESSIONID=D212***]
Request property X-Atlassian-Token, value: [no-check]
Request property Content-Type, value: [application/json; charset=utf-8]
Response code: 500, message: null, url: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Error data: {"reason":"Internal Server Error","message":"","statusCode":500}
Problem determination - response: 500: null
Problem determination - response url: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Problem determination - request url: https://wiki.domain.com/rest/api/latest/space?expand=description.plain%2Cmetadata.labels%2Chomepage&limit=25&start=300
Problem determination - response data: {"statusCode":500,"message":"","reason":"Internal Server Error"}
reset session

Cause

...

bgColor#f9ecc5

...

This error occurs when there no space description in the UI for Confluence space(s).

...

It

...

is caused because of NULL value for the

...

Description field in the database.

Solution

On receiving the internal server error with a response code 500, follow the below To fix the mentioned error, perform these steps:

  1. Verify whether if the description of any space is NULL , by running the below query from in the database:

    Code Block
    themeMidnight
    SELECT * FROM spaces WHERE spacedescid IS NULL ;


  2. In case of you find any space(s) having the description as NULL in the above results, make sure to update the description with a value from the UI.

  3. Once you update the description, re-run the getSpaceList action. This time, you will not receive the above error message observe no error and the CLI shows query result displays the list of spaces as expected

    Code Block
    themeMidnight
    --action getSpaceList --columns Key,Type,URL 


...