Skip to content

Commit 73fafd8

Browse files
author
Zachary Seguin
committed
feat(response): Update error responses to HTTP 200 because the web interface will not show the user the error on a 500 response
1 parent 4370e46 commit 73fafd8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ RUN CGO_ENABLED=0 go install .
3333
FROM scratch
3434
COPY --from=frontend /app/dist/out/default /static/
3535
COPY --from=backend /go/bin/jupyter-apis /jupyter-apis
36+
EXPOSE 5000
3637
ENTRYPOINT [ "/jupyter-apis" ]

httputils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (s *server) error(w http.ResponseWriter, r *http.Request, err error) {
2929
log.Printf("returning error response: %v", err)
3030

3131
w.Header().Add("Content-Type", "application/json")
32-
w.WriteHeader(http.StatusInternalServerError)
32+
w.WriteHeader(http.StatusOK)
3333
encoder := json.NewEncoder(w)
3434
werr := encoder.Encode(APIResponse{
3535
Success: false,

0 commit comments

Comments
 (0)