PradyumnaKrishna / enigma-protocol

An end to end encrypted messenger using Flask, SocketIO, and Vue.js
https://protocol.onpy.in
MIT License
19 stars 34 forks source link

Changes in Backend main.go code #103

Closed itsmeabhishek03 closed 4 months ago

itsmeabhishek03 commented 4 months ago

hey @PradyumnaKrishna hope you remember me. As you said, I would like to make some changes in main.go code.

1) I can Enhanced error handling by checking and logging errors where necessary. Can Add logging statements to important sections to aid in debugging. 2) I will Update the JSONResponse function to handle JSON marshaling errors and return an internal server error response in such cases. 3) Can use a defer statement to ensure that the server is closed even if there's an error during initialization. 4) Used http.StatusOK instead of hardcoding the status code "200" in the response functions. 5) Ensured consistent formatting for better readability.

Also i would like to mention that codepeak'23 is going to end on 28th december so please can you assign me these task as soon as possible your early response will be appreciated. Thank You

PradyumnaKrishna commented 4 months ago

Go ahead @itsmeabhishek03