debd57d3b9e54390b801a396b40314bd19ee596e
[institute/sw-backend.git] /
1 package com.supwisdom.institute.backend.admin.bff.apis.remote.exception;
2
3 import com.alibaba.fastjson.JSONObject;
4
5 public class FallbackError {
6   
7   private FallbackError() {
8     
9   }
10   
11   public static JSONObject defaultErrorJson(Throwable cause) {
12     JSONObject error = new JSONObject();
13     
14     error.put("code", -1);
15     error.put("message", cause.getMessage());
16     error.put("error", cause.getMessage());
17     
18     return error;
19   }
20
21 }