|
@@ -69,7 +69,8 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "CommandofExecution", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "CommandofExecution", ex.ToString())
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -129,7 +130,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "Availability", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "Availability", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -188,7 +191,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "ChangeConfiguration", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ChangeConfiguration", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -206,6 +211,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
HttpStatusCode statusCode = HttpStatusCode.InternalServerError;
|
|
|
try
|
|
|
{
|
|
|
+
|
|
|
//Does charge exist ?
|
|
|
ChargePointService chargePointService = new ChargePointService();
|
|
|
|
|
@@ -243,7 +249,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "GetConfiguration", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "GetConfiguration", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -307,7 +315,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "GetDiagonostics", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "GetDiagonostics", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -346,8 +356,15 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
+ return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
+ {
|
|
|
+ Code = 2999,
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "GetLocallistversion", ex.ToString())
|
|
|
|
|
|
- return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse() { Code = 2999, Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "GetLocallistversion", ex.ToString()) });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -457,12 +474,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "StopTransaction", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "StartTransaction", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -522,12 +541,15 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
- return Request.CreateResponse(HttpStatusCode.InternalServerError, new ErrorResponse()
|
|
|
+ return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "StopTransaction", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "StopTransaction", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -606,12 +628,16 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "ReserveNow", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ReserveNow", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -665,12 +691,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "CancelResrvation", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "CancelResrvation", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -724,12 +752,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "Reset", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "Reset", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -808,12 +838,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "ClearCache", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "SendLocalList", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -861,12 +893,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "ClearCache", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ClearCache", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -945,7 +979,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "StopTransaction", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "SetChargingProfile", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -1002,10 +1038,13 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
|
|
|
+
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "ClearChargingProfile", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ClearChargingProfile", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -1058,12 +1097,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "TriggerMessage", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "TriggerMessage", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -1114,12 +1155,15 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
|
- Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "UnlockConnector", ex.ToString())
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "UnlockConnector", ex.ToString())
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -1176,8 +1220,14 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
+ return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
+ {
|
|
|
+ Code = 2999,
|
|
|
+ Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
+ ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "CompositeSchedule", ex.ToString())
|
|
|
|
|
|
- return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse() { Code = 2999, Message = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR, "GetLocallistversion", ex.ToString()) });
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|