Added few exception handling

Exception handling added for two post requests
.gitignore updated