package uk.ac.ic.wlgitbridge.snapshot.base;

import com.google.gson.JsonElement;
import uk.ac.ic.wlgitbridge.git.exception.SnapshotAPIException;

import java.util.Arrays;
import java.util.List;

public class MissingRepositoryException extends SnapshotAPIException {

    public static final String GENERIC_REASON =
        "This Overleaf project currently has no git access.\n" +
        "\n" +
        "If this problem persists, please contact us.";

    public static final String EXPORTED_TO_V2 =
        "This Overleaf project has been moved to Overleaf v2, and git access is temporarily unsupported.\n" +
        "\n" +
        "See https://www.overleaf.com/help/342 for more information.";

    private String message = "";

    public MissingRepositoryException() {
    }

    public MissingRepositoryException(String message) {
        this.message = message;
    }

    @Override
    public void fromJSON(JsonElement json) {}

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public List<String> getDescriptionLines() {
        return Arrays.asList(getMessage());
    }

}

@@ -164,16 +164,44 @@
 Arrays;%0A
+import java.util.ArrayList;%0A
 import j
@@ -312,22 +312,28 @@
 c final 
+List%3C
 String
+%3E
  GENERIC
@@ -341,16 +341,31 @@
 REASON =
+ Arrays.asList(
 %0A       
@@ -416,21 +416,18 @@
  access.
-%5Cn%22 +
+%22,
 %0A       
@@ -420,37 +420,34 @@
 ess.%22,%0A        %22
-%5Cn%22 +
+%22,
 %0A        %22If thi
@@ -485,16 +485,22 @@
 act us.%22
+%0A    )
 ;%0A%0A    p
@@ -518,22 +518,28 @@
 c final 
+List%3C
 String
+%3E
  EXPORTE
@@ -547,16 +547,31 @@
 _TO_V2 =
+ Arrays.asList(
 %0A       
@@ -667,21 +667,18 @@
 pported.
-%5Cn%22 +
+%22,
 %0A       
@@ -683,13 +683,10 @@
    %22
-%5Cn%22 +
+%22,
 %0A   
@@ -751,16 +751,22 @@
 mation.%22
+%0A    )
 ;%0A%0A    p
@@ -776,27 +776,37 @@
 ate 
+List%3C
 String
- message = %22%22
+%3E descriptionLines
 ;%0A%0A 
@@ -842,24 +842,76 @@
 ception() %7B%0A
+        descriptionLines = new ArrayList%3CString%3E();%0A
     %7D%0A%0A    p
@@ -978,25 +978,177 @@
 his.
-message = message
+descriptionLines = Arrays.asList(message);%0A    %7D%0A%0A    public MissingRepositoryException(List%3CString%3E descriptionLines) %7B%0A        this.descriptionLines = descriptionLines
 ;%0A  
@@ -1275,23 +1275,56 @@
  return 
-message
+String.join(%22%5Cn%22, this.descriptionLines)
 ;%0A    %7D%0A
@@ -1405,35 +1405,29 @@
 urn 
-Arrays.asList(getMessage())
+this.descriptionLines
 ;%0A  

Use a List<String> rather than hard-coding newlines