{"action":"created","comment":{"url":"https://api.github.com/repos/wemrysi/quasar/pulls/comments/43443324","id":43443324,"diff_hunk":"@@ -0,0 +1,72 @@\n+package quasar.api\n+\n+import quasar.Predef._\n+\n+import argonaut._\n+import argonaut.Argonaut._\n+import org.http4s.argonaut._\n+\n+import org.http4s.{EntityEncoder, Response}\n+import org.http4s.dsl._\n+import org.http4s.headers.{`Content-Disposition`, `Content-Type`}\n+\n+import quasar.fs.FileSystemError._\n+import quasar.fs.PathError2.{InvalidPath0, PathExists0, PathNotFound0}\n+import quasar.fs._\n+import quasar.fp._\n+\n+import scalaz._, Scalaz._\n+import scalaz.concurrent.Task\n+import scalaz.stream.Process\n+\n+import pathy.Path._\n+\n+package object services {\n+  // TODO: Polish this up\n+  def fileSystemErrorResponse(error: FileSystemError): Task[Response] =\n+    error.fold(\n+      pathErrorResponse,\n+      unknownReadHandle => BadRequest(\"unknow read handle\"),\n+      unknownWriteHandle => BadRequest(\"unknow write handle\"),\n+      partialWrite => BadRequest(\"Partial write\"),\n+      (data, str) => BadRequest(\"some other thing\")\n+    )\n+\n+  def pathErrorResponse(error: PathError2): Task[Response] =\n+    error match {","path":"web/src/main/scala/quasar/api/services/package.scala","position":36,"original_position":36,"commit_id":"a1c31e8f9cb3fa1151ad0f22a7c9ed000dfe81a4","original_commit_id":"a1c31e8f9cb3fa1151ad0f22a7c9ed000dfe81a4","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"body":"Ya that is probably a good idea.","created_at":"2015-10-29T20:57:38Z","updated_at":"2015-10-29T20:57:38Z","html_url":"https://github.com/wemrysi/quasar/pull/2#discussion_r43443324","pull_request_url":"https://api.github.com/repos/wemrysi/quasar/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/comments/43443324"},"html":{"href":"https://github.com/wemrysi/quasar/pull/2#discussion_r43443324"},"pull_request":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/wemrysi/quasar/pulls/2","id":49043134,"html_url":"https://github.com/wemrysi/quasar/pull/2","diff_url":"https://github.com/wemrysi/quasar/pull/2.diff","patch_url":"https://github.com/wemrysi/quasar/pull/2.patch","issue_url":"https://api.github.com/repos/wemrysi/quasar/issues/2","number":2,"state":"open","locked":false,"title":"Wp/sd 983 web api","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-28T17:54:25Z","updated_at":"2015-10-29T20:57:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43549e159db54bf1be34ab258dfe649dc2d3146d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wemrysi/quasar/pulls/2/commits","review_comments_url":"https://api.github.com/repos/wemrysi/quasar/pulls/2/comments","review_comment_url":"https://api.github.com/repos/wemrysi/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wemrysi/quasar/issues/2/comments","statuses_url":"https://api.github.com/repos/wemrysi/quasar/statuses/a1c31e8f9cb3fa1151ad0f22a7c9ed000dfe81a4","head":{"label":"jedesah:wp/SD-983_web-api","ref":"wp/SD-983_web-api","sha":"a1c31e8f9cb3fa1151ad0f22a7c9ed000dfe81a4","user":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"repo":{"id":39122146,"name":"Quasar","full_name":"jedesah/Quasar","owner":{"login":"jedesah","id":1780116,"avatar_url":"https://avatars.githubusercontent.com/u/1780116?v=3","gravatar_id":"","url":"https://api.github.com/users/jedesah","html_url":"https://github.com/jedesah","followers_url":"https://api.github.com/users/jedesah/followers","following_url":"https://api.github.com/users/jedesah/following{/other_user}","gists_url":"https://api.github.com/users/jedesah/gists{/gist_id}","starred_url":"https://api.github.com/users/jedesah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedesah/subscriptions","organizations_url":"https://api.github.com/users/jedesah/orgs","repos_url":"https://api.github.com/users/jedesah/repos","events_url":"https://api.github.com/users/jedesah/events{/privacy}","received_events_url":"https://api.github.com/users/jedesah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jedesah/Quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/jedesah/Quasar","forks_url":"https://api.github.com/repos/jedesah/Quasar/forks","keys_url":"https://api.github.com/repos/jedesah/Quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jedesah/Quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jedesah/Quasar/teams","hooks_url":"https://api.github.com/repos/jedesah/Quasar/hooks","issue_events_url":"https://api.github.com/repos/jedesah/Quasar/issues/events{/number}","events_url":"https://api.github.com/repos/jedesah/Quasar/events","assignees_url":"https://api.github.com/repos/jedesah/Quasar/assignees{/user}","branches_url":"https://api.github.com/repos/jedesah/Quasar/branches{/branch}","tags_url":"https://api.github.com/repos/jedesah/Quasar/tags","blobs_url":"https://api.github.com/repos/jedesah/Quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jedesah/Quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jedesah/Quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/jedesah/Quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jedesah/Quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/jedesah/Quasar/languages","stargazers_url":"https://api.github.com/repos/jedesah/Quasar/stargazers","contributors_url":"https://api.github.com/repos/jedesah/Quasar/contributors","subscribers_url":"https://api.github.com/repos/jedesah/Quasar/subscribers","subscription_url":"https://api.github.com/repos/jedesah/Quasar/subscription","commits_url":"https://api.github.com/repos/jedesah/Quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/jedesah/Quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/jedesah/Quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/jedesah/Quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/jedesah/Quasar/contents/{+path}","compare_url":"https://api.github.com/repos/jedesah/Quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jedesah/Quasar/merges","archive_url":"https://api.github.com/repos/jedesah/Quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jedesah/Quasar/downloads","issues_url":"https://api.github.com/repos/jedesah/Quasar/issues{/number}","pulls_url":"https://api.github.com/repos/jedesah/Quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/jedesah/Quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/jedesah/Quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jedesah/Quasar/labels{/name}","releases_url":"https://api.github.com/repos/jedesah/Quasar/releases{/id}","created_at":"2015-07-15T07:12:13Z","updated_at":"2015-09-14T20:57:00Z","pushed_at":"2015-10-29T18:21:12Z","git_url":"git://github.com/jedesah/Quasar.git","ssh_url":"git@github.com:jedesah/Quasar.git","clone_url":"https://github.com/jedesah/Quasar.git","svn_url":"https://github.com/jedesah/Quasar","homepage":null,"size":7649,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wemrysi:wip/SD-983","ref":"wip/SD-983","sha":"3e85ff794cee6d9ea81618f8199cb845c7c91cc8","user":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"repo":{"id":40374964,"name":"quasar","full_name":"wemrysi/quasar","owner":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wemrysi/quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/wemrysi/quasar","forks_url":"https://api.github.com/repos/wemrysi/quasar/forks","keys_url":"https://api.github.com/repos/wemrysi/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wemrysi/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wemrysi/quasar/teams","hooks_url":"https://api.github.com/repos/wemrysi/quasar/hooks","issue_events_url":"https://api.github.com/repos/wemrysi/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/wemrysi/quasar/events","assignees_url":"https://api.github.com/repos/wemrysi/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/wemrysi/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/wemrysi/quasar/tags","blobs_url":"https://api.github.com/repos/wemrysi/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wemrysi/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wemrysi/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/wemrysi/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wemrysi/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/wemrysi/quasar/languages","stargazers_url":"https://api.github.com/repos/wemrysi/quasar/stargazers","contributors_url":"https://api.github.com/repos/wemrysi/quasar/contributors","subscribers_url":"https://api.github.com/repos/wemrysi/quasar/subscribers","subscription_url":"https://api.github.com/repos/wemrysi/quasar/subscription","commits_url":"https://api.github.com/repos/wemrysi/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/wemrysi/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/wemrysi/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/wemrysi/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/wemrysi/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/wemrysi/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wemrysi/quasar/merges","archive_url":"https://api.github.com/repos/wemrysi/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wemrysi/quasar/downloads","issues_url":"https://api.github.com/repos/wemrysi/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/wemrysi/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/wemrysi/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/wemrysi/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wemrysi/quasar/labels{/name}","releases_url":"https://api.github.com/repos/wemrysi/quasar/releases{/id}","created_at":"2015-08-07T18:29:08Z","updated_at":"2015-09-14T20:43:00Z","pushed_at":"2015-10-29T20:26:08Z","git_url":"git://github.com/wemrysi/quasar.git","ssh_url":"git@github.com:wemrysi/quasar.git","clone_url":"https://github.com/wemrysi/quasar.git","svn_url":"https://github.com/wemrysi/quasar","homepage":null,"size":7741,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/2"},"html":{"href":"https://github.com/wemrysi/quasar/pull/2"},"issue":{"href":"https://api.github.com/repos/wemrysi/quasar/issues/2"},"comments":{"href":"https://api.github.com/repos/wemrysi/quasar/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wemrysi/quasar/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/wemrysi/quasar/statuses/a1c31e8f9cb3fa1151ad0f22a7c9ed000dfe81a4"}}}}