+(defvar *candle-dir* nil
+ "*CANDLE-DIR*
+
+VALUE TYPE:
+
+ A pathname or pathstring
+
+INITIAL VALUE:
+
+ NIL
+
+DESCRIPTION:
+
+ The main directory for all candle work to be done in. When the server is running
+ in local mode, this is also the place that builds are built in")
+
+(define-condition candle-error (error)
+ ((reason :initarg :reason :reader candle-error-reason))
+ (:documentation
+ "An error on the server that needs to be handled in the client.
+
+This error is usually because some input was incorrect. The response will
+have a reason that is a keyword that must be handled. The current used keywords
+are:
+
+- :project-does-not-exist - if the project isn't in the database
+- :invalid-project-name - the specified name doesn't match the requirements
+- :invlides-project-uri - the uri isn't reachable by git
+- :project-name-taken - name is a duplicate
+- :project-failed-to-get-branches - when refreshing fails
+- :job-does-not-exist - the specified job can't be found"))
+
+(setf (documentation 'candle-error-reason 'function)
+ "CANDLE-ERROR-REASON CANDLE-ERROR => REASON
+
+ARGUMENTS AND VALUES:
+
+ CANDLE-ERROR: the error for the reason
+ REASON: a keyword representing the reason
+
+DESCRIPTION:
+
+ Returns the reason for this candle error. See the documentation of
+ the candle-error condition for possible values")